Date & Time Picker

Component ID

2685025

Component name

Date & Time Picker

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Date Time Picker allows you to use the datetimepicker plugin (http://xdsoft.net/jqplugins/datetimepicker/) to build a form using the forms API. For example:

$form['date_time_picker'] = array(
  '#type' => 'date_time_picker',
  '#title' => $this->t('Pick a date')
);

This module also provides a widget for the date fields on your entity types. Choose 'Date Time Picker' as the widget on the Manage Form Display and your users will be able to use the plugin on their entity add forms.

Installation:
- Download the jquery library from here: https://github.com/xdan/datetimepicker
- Extract and paste jquery.datetimepicker.css to /libraries/date_time_picker/css and jquery.datetimepicker.full.js to /libraries/date_time_picker/js
- Enable the module.

Future Enhancements:
- Create 2 more form elements: date_only_picker and time_only_picker
- Read the date field setting and render the correct form element for the field widget.