Skip to content Skip to sidebar Skip to footer

Modify Datetimepicker Dynamically With Javascript

I am initializing a datetimepicker as $(document).ready(function() { $('#meeting_datetime').datetimepicker({format: 'LLLL', stepping: 5, enabledHours: [], daysOfWeekDisabled:

Solution 1:

I found the solution... just use the functions instead

$("#meeting_datetime").data("DateTimePicker").daysOfWeekDisabled(weekday_unchecked_value)
$("#meeting_datetime").data("DateTimePicker").enabledHours([meeting_time_moment.hours()])
$("#meeting_datetime").data("DateTimePicker").stepping(60)

it seems to me that there should be an easier way, but this is quick and works fine...

Post a Comment for "Modify Datetimepicker Dynamically With Javascript"