Frederick Posted October 16, 2019 Share Posted October 16, 2019 I use the following JS code in the AfterRender event of the ClientEvents.ExtEvents property do put slash delimiters for the date entry:- function afterrender(sender, eOpts) { $("#"+sender.inputEl.id).inputmask("99/99/9999",{placeholder:"dd/mm/yyyy"}); } In the OnChange event of the TUniDateTimePicker, I display the text property of the control and unless I enter a full valid date, the value displayed is always 30/12/1899. So, entering 01/10/19 to represent 1st October 2019 will still be invalid. Only 01/10/2019 will be valid. How do I get the actual text entered in the control so that I can change the 01/10/19 entry to 01/10/2019 in code? P.S. As an enhancement request, I would like TUniDateTimePicker and TUniDBDateTimePicker to have a delimiter property so that using JS code for this purpose is not necessary. These two controls already have a DateFormat property and it could be used to obtain the delimiters to use. -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1511) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2019 Share Posted October 16, 2019 3 hours ago, Frederick said: function afterrender(sender, eOpts) { $("#"+sender.inputEl.id).inputmask("99/99/9999",{placeholder:"dd/mm/yyyy"}); } You can try to use "99/99/99[99]" instead of "99/99/9999". Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 16, 2019 Author Share Posted October 16, 2019 Thank you. It works like a charm! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.