I have a custom page which I created in a custom module with hook_menu
$items['node/add/envelopedetails'] = array(
'title' => 'Envelope Details - Add',
'page callback' => 'envelope_details_add',
'access arguments' => array('access airflight theme'),
'type' => MENU_CALLBACK,
In my function for that page, I am calling a them template.
In my theme, I am trying to render Date Popup but its not working. PLEASE NOTE: Date, Date API and Date Popup modules have been enabled. Date popups are working if I go on a normal, say, Create Content page of a Content Type. Date popup works there but not on my custom page. It leads me to believe that I might need to load some extra module or call a function to bring in required files for it to work.
$format = 'd-m-Y';
$form['datetest'] = array(
'#type' => 'date_popup',
'#title' => 'Select a Date',
'#default_value' => date('Y-m-d'),
'#date_format' => 'Y-m-d',
'#date_label_position' => 'within',
'#date_increment' => 15,
'#date_year_range' => '0:+2',
Can someone please help? I have searched all forums and Google for last 3 hours with no luck. Please help.