I have multi-step form and few basic forms in my power portal, and I have few date pickers too.
Somehow I am unable to block future dates in few areas and in other area it's working fine.
Here is my code to block future date :
$("#field_name").next().data("DateTimePicker").maxDate(moment().add(0, 'days'));
I do have that field name on form, can't figure out that why it's not working in some area in my portal ? Whole portal is using same web template.
I keep getting this error "Cannot read properties of undefined (reading 'maxDate')"