Jump to content

Blank Date Encountered When JS Code Is Used In AfterRender Event Of TUniDateTimePicker


Frederick

Recommended Posts

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)
 

TUniDateTimePicker AfterRender.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...