Estimation Payments Form - date formating

Hi,

This is a follow up to this previous topic > Estimation & Payment Forms - Date validation

I am using the custom code provided by this forum in the above topic >

jQuery(document).ready(function(){ setTimeout(function(){ var day = moment.utc(jQuery('[data-itemid="243"]').datetimepicker('getDate')).format('YYYY-MM-DD'); var newDay = moment(day).add(1, 'day'); jQuery('[data-itemid="243"]').datetimepicker('setDate',newDay.toDate()); },250); jQuery('[data-itemid="242"]').on('changeDay', function (ev) { var day = moment.utc(ev.date).format('YYYY-MM-DD'); var day2 = moment.utc(jQuery('[data-itemid="243"]').datetimepicker('getDate')).format('YYYY-MM-DD'); if(day2 <= day){ var newDay = moment(day).add(1, 'day'); jQuery('[data-itemid="243"]').datetimepicker('setDate',newDay.toDate()); } }); jQuery('[data-itemid="243"]').on('changeDay', function (ev) { var day2 = moment.utc(ev.date).format('YYYY-MM-DD'); var day = moment.utc(jQuery('[data-itemid="242"]').datetimepicker('getDate')).format('YYYY-MM-DD'); if(day2 <= day){ var newDay = moment(day2).subtract(1, 'day'); var now = moment.utc(new Date()); if(newDay.format('YYYY-MM-DD') >= now.format('YYYY-MM-DD')){ jQuery('[data-itemid="242"]').datetimepicker('setDate',newDay.toDate()); } else { jQuery('[data-itemid="242"]').datetimepicker('setDate',now.toDate()); newDay = moment(now).add(1, 'day'); setTimeout(function(){ jQuery('[data-itemid="243"]').datetimepicker('setDate',newDay.toDate()); },200); } } }); });

but I am getting the Departure date showing in the wrong format in the email notifications

Can you please advise what I can do to show the Departure Date in the same format as the Arrival date?

Thank you for your help

Please close this… it appears to have been a caching issue

Hi Scot,

Glad to know that.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.