date_time_picker
date_time_picker copied to clipboard
Trying to set initial values is giving unexpected results
I am trying initialize the date_time_picker with the following parameters: type: DateTimePickerType.date initialTime: null initialDate: 1972-11-30 00:00:00.000 initialValue: 11/30/1972
locale is "en_US".
Expected outcome: I am expecting it to initialize with '11/30/1972' in the input field.
Actual outcome: Instead, it initializes with todays date.
hard coded initialValue: '1996-05-16 14:07:00' works but if we set it dynamically it does NOT work. Any suggestion, will be highly appreciated. Thanks.
initialTime and initialData is just to set clock picker and calendar picker if initialValue was null, otherwise, it will use the initialValue. So, as you set initialValue, initialDate will be ignored. Now, in this case initialValue neet aways be YYYY-mm-dd format.