limit time in date time field
Posted: 05 Jan 2018
I have the following JavaScript code to limit the time selection in two date time fields called StartDate and EndDate. This was working perfectly until I upgraded to the latest forms designer version. I have tried to resave the forms, but it still doesn't work. Any help would be appreciated.
fd.field('StartDate').control()._el().find('select:eq(0) > option').filter(function() { return $(this).index() < 8 || $(this).index() > 20 }).remove()
fd.field('EndDate').control()._el().find('select:eq(0) > option').filter(function() { return $(this).index() < 8 || $(this).index() > 20 }).remove()
fd.field('StartDate').control()._el().find('select:eq(0) > option').filter(function() { return $(this).index() < 8 || $(this).index() > 20 }).remove()
fd.field('EndDate').control()._el().find('select:eq(0) > option').filter(function() { return $(this).index() < 8 || $(this).index() > 20 }).remove()