Experimental project
This is a sandbox project, which contains experimental code for developer use only.
The datetime-local module adds support for the HTML5 datetime-local form element to Drupal 7. Because native browser support for this form element type is still being implement by major browsers, it also provides an option to load a fallback JavaScript date/timepicker calendar widget for browsers without support.
The fallback JavaScript widget uses the Drupal 7 jQuery datapicker plugin along with a bundled version of the jQuery Timepicker Addon plugin by Trent Richardson: https://github.com/trentrichardson/jQuery-Timepicker-Addon
This module only adds support for the datetime-local form element to developers implementing it via code, similar to the Elements module: https://www.drupal.org/project/elements
For more information on the HTML5 datatime-local form type see:
- http://www.w3.org/TR/html-markup/input.datetime-local.html
- http://www.aquim.com/web-article-240.html
- http://html5doctor.com/html5-forms-input-types
Usage:
To use the datatime-local form element, set the #type
of the form element to 'datetime-local'
when defining your form array. You can also define the #min
, #max
, and #step
attributes. Valid dates for these and the #default_value
can be a PHP date object, UNIX timestamp, or date string.
Project information
- Created by PCateNumbersUSA on , updated