Hi.
This seems to work.
/^((8|10) AM)|(([24]|12) PM)/g
Could try using: https://www.regextester.com/ to test your Regex expression.
I tried your code:
NWF$("select[name$='Hours'] option").each(function(){ if(NWF$(this).val().match(/^(([0-7,9,11]|12) AM)|(([1,3,5-9]|1[0-1]) PM)/g)) { NWF$(this).remove(); }});
it not working for me at all. "...name $='Hours' ..." where are you adding this?
I am also trying to limit time range, not successful so far. Where are you adding the code? and 'Hours' is this name part of the date picker function?
Under Settings, custom JavaScript, I have add the following code:
NWF.FormFiller.Events.RegisterAfterReady(function () {
NWF$('#' + dateCtrl_Start).datepicker('option',{ minDate: new Date(), beforeShowDay: NWF$.datepicker.noWeekends,});
NWF$('#' + dateCtrl_End).datepicker('option',{ minDate: new Date(), beforeShowDay: NWF$.datepicker.noWeekends,});
NWF$('.OnlyHalfHour select.nf-datepicker-select:not(.nf-hours) :not(option[value="00"], option[value="30"])').remove(); // to limit min. to 00 and 30//
NWF$("select[name$='Hours'] option").each(function(){
if(NWF$(this).val().match(/^(([0-7,9,11]|12) AM)|(([1,3,5-9]|1[0-1]) PM)/g)) { NWF$(this).remove(); }});
});