/ Published in: PHP
I can never remember how to trigger the Date Popup widget when writing a $form in Drupal so I've pulled out the instructions below.
This requires that the date_api, date_timezone and date_popup modules are all enabled.
This requires that the date_api, date_timezone and date_popup modules are all enabled.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* * Set the #type to date_popup and fill the element #default_value with a date adjusted to * the proper local timezone in datetime format (YYYY-MM-DD HH:MM:SS). * * #date_timezone * The local timezone to be used to create this date. * * #date_format * Unlike earlier versions of this popup, most formats will work. * * #date_increment * Increment minutes and seconds by this amount, default is 1. * * #date_year_range * The number of years to go back and forward in a year selector, * default is -3:+3 (3 back and 3 forward). * */