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

Forge Component
Published on 10 Jan by Samuel M.
14 votes
Published on 10 Jan 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


Best regards,


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.