How do I dynamically update hoursAvailable based when the date is changed in the dropdown
How do I dynamically update hoursAvailable based when the date is changed in the dropdown
I am trying to figure out how to update the hoursAvailable when the user selects a date from the dateTime picker within an editor. If it is the current date I only want to allow hours up to current hour but if it is a previous date I want to allow all hours. but when I look at the following URL (hoursAvailable) it only shows the following example which isn't helpful within the editor:
$(document).ready(function () {
new DateTime(document.getElementById('test'), {
hoursAvailable: [8, 9, 10]
});
});
I can't find any example for setting it like I would for maxDate in the dependent method like this:
proxCardLotAccessEditor.field.dependent('actualUsageDateTime',
function(val, data, callback, e) {
....
proxCardLotAccessEditor.field('effectiveDate').maxDate(maxDate);
....
});
How can I dynamically update hoursAvailable option on a dateTime field in and editor when the date is changed?
Regards,
RobO.