Page 1 of 1

Date Picker Control

Posted: Wed Dec 27, 2023 5:45 pm
by peters
Afternoon,
This is just a simple question and all I am looking for is some opinions.
The datepicker popup that presents itself when you access a date input bound to a mySQL date field enters the date in the mm/dd/yyyy format. mySQL date type fields are looking for a Yyyy-Mm-Dy format.
I kind of wonder why the datepicker format would be in a format that does not match what mySQL is looking for?

Facing this format mis-match what are most of you doing?
- converting the format in PHP code prior to performing the INSERT?
. . . or . .
- has anyone actually dug into the datepicker code and modified it so it presents the date picked in the Yyyy-mm-dd format?

Just wondering what others are doing?
Any advice or opinions would be appreciated!

Re: Date Picker Control

Posted: Thu Dec 28, 2023 5:33 am
by gofrank
If you select the Properties of the DatePicker, the General tab has a field named DateFormat. There, you can choose any of the values available in the dropdown, OR enter your own format, overriding all of the default values. This will give you the ability to enter "Yyyy-Mm-Dy". Keep in mind, the format you enter must correspond with the actual format being used by your operating system to return a valid date.