Hello! I want to add in 2 jquery datepickers to my html dashboard.
I can see the jquery date picker calendar, but whenever I click a date the input field does not populate. I think I'm missing very simple and I'd love feedback..
Please keep in mind I'm pretty new to HTML/Javascript. I used the KV Store tutorial, and inserted some code...
HTML (Note HTML below doesn't have the <>. To show you the code I had to remove it):
div type="text" name="date" id="input3" class="datepicker"
label DCT_DueDate /label
/div br
div type="text" name="date" id="input4" class="datepicker"
label DIA_DueDate /label
/div br
JAVASCRIPT:
<script>
$(function() {
$("#input3").datepicker();
});
var input3 = new TextInput({
"id": "input3",
"value": "$form.DCT_DueDate$",
"el": $('#input3')
}, {tokens: true}).render();
input3.on("change", function(newValue) {
FormUtils.handleValueChange(input3);
});
var input4 = new TextInput({
"id": "input4",
"value": "$form.DIA_DueDate$",
"el": $('#input4')
}, {tokens: true}).render();
input4.on("change", function(newValue) {
FormUtils.handleValueChange(input4);
});
</script>
↧