I'm not sure if you want this to be a release blocker or if you want to have the release out as soon as possible in order to start receiving feedback, but this is a must-have. Especially for allowing end users to enter their birthdays in an easy way + in order to keep the formatting the way the admin requires it before saving to the db.

Comments

klonos’s picture

...from: http://atur-lalai.blogspot.com/2011/03/use-jquery-datepicker-in-drupal-7...

Use jquery datepicker in Drupal 7:

Use jquery datepicker in Drupal 7
  drupal_add_library('system','ui.datepicker');
  drupal_add_js('jQuery(document).ready(function(){jQuery( ".pickadate" ).datepicker({
      dateFormat: "dd/mm/yy",
      autoSize: true
    });});', 'inline'); 

  $form['textaje'] = array(
    '#type' => 'textfield',
    '#title' => t('Tarikh'),
    '#size' => 10,
    '#maxlength' => 10,
    '#attributes' => array('class' => array('pickadate')),
  ); 
Niklas Fiekas’s picture

Looks reasonable. And thank you for already investigating how that could be done.

klonos’s picture

No problem mate. I wish I could do more (like actually cod something). I thank YOU for putting all this effort and spending all your precious time on this.

andypost’s picture

I think module should use Drupal.behaviours.birthday to attach picker to fields with this option enabled

Niklas Fiekas’s picture

For testing, here goes a basic datepicker popup: http://drupalcode.org/project/birthdays.git/commitdiff/7e5d5c2

Todo:
- Make it optional (or a different widget)
- Don't select year if the year should be hidden

Niklas Fiekas’s picture

Niklas Fiekas’s picture

Status: Active » Fixed

Added "Use a datepicker" as a field instance setting: http://drupalcode.org/project/birthdays.git/commitdiff/aa78551

klonos’s picture

Perfect! Thanx Niklas.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dgastudio’s picture

Component: Code » Code (Birthdays)
Status: Closed (fixed) » Active

reopening due to that the datepicker has been removed in the latest dev version.

Niklas Fiekas’s picture

klonos’s picture

Thanx!

Automatically closed -- issue fixed for 2 weeks with no activity.