0

I have installed Date Picker Module and it works fine.

enter image description here

Below is the code:

$form['date'] = array(
    '#title' => t('Select your birthdate'),
    '#type' => 'datepicker',
    '#date_format' => 'd/m/Y',
    '#date_year_range' => '-100:+0',
    '#default_value' => date("Y-m-d H:i:s", time()),
);

I want to display not it inline. I want it to be a textfield and when the focus is on the textfield, the calendar will pop-up. What configuration should I tweak to make it possible? Thanks.

  • 1
    Instead of Date Picker module, you can use Date module and enable Date Popup plugin. – latikas Jul 23 '15 at 9:43
  • @latikas --> An example how to use the date pop plugin will be very much appreciated. Thanks. – user46175 Jul 24 '15 at 1:16
0

Have you tried using DatePicker inline module?

From module page:

This module permits inline rendering of date's popup widget. That is, it display the datepicker embedded in the page instead of in an overlay.

It integrates with field API, form API and views exposed filters (via date_views).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy