Javascript datepicker problem

8 views
Skip to first unread message

dros...@gmail.com

unread,
Jun 23, 2021, 9:09:20 AM6/23/21
to Lightning - 4D Web Applications
In a Lightning (jquery) detail form I have a datepicker defined with this script:

<script type="text/javascript">
$( '#\\.Ltg_CPAgreementSigDate_d' ).datepicker({
  changeMonth: false,
  changeYear: false,
  yearRange: "-0:+0",
  dateFormat: "mm/dd/yy",
});
</script>

When a user clicks the OK button in the form, 4D code does some data validation checks on all of the entry fields and if there are any errors returns a message via Ltg_JS_Send. This works fine, except that the display of the above date gets scrambled. If the user selected 06/23/2021, after the error message is sent it changes to 11/06/2022.

Any suggestions for fixing this?
Reply all
Reply to author
Forward
0 new messages