Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by BenWaFj

  1. Hello, please did you ever get a solution for this? I am trying to do similar.
  2. For anyone using UK dates: the above did not work for me. This did though: <script type="text/javascript">document.addEventListener('DataPageReady', assignAdditionalListeners);let dateInputField= document.getElementById("InsertRecordDate");function assignAdditionalListeners() {dateInputField.addEventListener('change', alertPastDate);document.removeEventListener('DataPageReady', assignAdditionalListeners);}function alertPastDate(event) {dateChosen = dateInputField.value;split = dateChosen.split('/');var dateChosenConverted = [split[1], split[0], split[2]].join('/');console.log(dateChosenConverted);if ( new Date( dateChosenConverted ) > new Date() ) {alert( 'No Future Dates Accepted' );dateInputField.value = "";}}</script>
  • Create New...