Link to home
Start Free TrialLog in
Avatar of dcass
dcassFlag for United States of America

asked on

Need Calendar field in PHP to select date

I'm sure it's here somewhere but I am out of time.  I am a programmer but fairly new to PHP / javascript.
I need code for a (read only) date input field with a small Calendar image that when clicked, displays a calendar with the current date selected.  When the user selects a date, it fills in the field.
Then I need how to change that date from MM/DD/YY to YYYY/MM/DD for output to the database.
The simpler the better.
This should be really easy for you pros!
ASKER CERTIFIED SOLUTION
Avatar of Amar Bardoliwala
Amar Bardoliwala
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dave Baldwin
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree that the jQuery date picker is the best.  You see it everywhere.

As far as learning how to handle date format conversions, this article will be helpful.  The PHP functions date() and strtotime() work well together.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html