How to use datetimepicker on input that was created on the fly using .append()?
Hi
I have a code that appends input fields. Now what I am trying to do is when a user click on any of the field that are generated on the fly then I need a datetimepicker to be displayed.
I have did this code 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 get this code to work? note all of the inputs have the same class which is triggerOnPicker