I create inputs using .append() method on the fly what I need to do is bring up the datetimepicker when a user click's on the input field.
Here is what I have done so far but it is not working for me
$('.triggerOnPicker').on('focus', datetimepicker({
timeFormat: "hh:mm TT",
changeMonth: true,
changeYear: true,
stepMinute: 5,
beforeShowDay: $.datepicker.noWeekends,
HourMin: 5,
HourMax: 17,
minDate: 0
});
How can I fix this code to display the datetimepicker?
Thanks
I got it I had to add datetimepicker code to my $.getJSON();
$.getJSON(
//handle the request code
).done(function(){
$('.triggerOnPicker').datetimepicker({
timeFormat: "hh:mm TT",
changeMonth: true,
changeYear: true,
stepMinute: 5,
beforeShowDay: $.datepicker.noWeekends,
HourMin: 5,
HourMax: 17,
minDate: 0
});
});