I'm using Drupal 7 and Clean theme.
Can i add date picker in content type field?
Searched about this but i not found any solution.
Users, when click date field, come date picker. Is it possible?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityThe Date module has a submodule called "Date Popup" which provides a jQuery UI popup widget for fields.
Just install that module, add a new field to your content type, and when choosing the widget select "Pop-up calendar":
If you want to do it with code it would look something like this.
The callback
function callback($date){
drupal_add_library('system', 'ui.datepicker');
drupal_add_js("(function ($) { $('.datepicker').datepicker(); })(jQuery);", array('type' => 'inline', 'scope' => 'footer', 'weight' => 5));
return theme('my_theme');
}
The template
<input type="text" class="datepicker" name="renewaldate" />