[flatpickr] Assign values to Date and Time Textbox on prep

[flatpickr] Assign values to Date and Time Textbox on prep

  
Forge Component
(13)
Published on 6 Apr by Samuel M.
13 votes
Published on 6 Apr by Samuel M.

Hi Sammuel,

A really quick question. Im using the widget and Im trying to load the Date and Time that i have received from the API in to the Textboxes respectively. 

the Date data type i receive is Text and the Time data type that i receive is also Text. i converted using TextToDate and TextToTime functions respectively and assigned them to the Variables associated with the text boxes and widgets respectively on preparations. However the values still cannot be display in the text box.

could you kindly assist me on this


Thanks,

Best regards,

Hitesh

Hi Hitesh,

You don't give enough information to help you.

If the text can't be converted to a valid Date value, the function will return the Date default value. To check if the conversion is possible you can use the TextToDateValidate function.
You should check the limits of the Date data type. You should also ensure that the date you type in the argument complies with the default date format (yyyy-mm-dd, yyyy/mm/dd, and yyyy.mm.dd) or the server’s environment configuration.

Regards,

Daniel