Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Date picker in admin for app generated by ./elefant/crud-app

edited June 2014 in Framework

In an app generated by ./elefant/crud-app myapp field1 field2 field3:date, I found I needed to add

$page->add_style ('/js/jquery-ui/jquery-ui.css');
$page->add_script ('/js/jquery-ui/jquery-ui.min.js');

to apps/myapp/handlers/add.php and apps/myapp/handlers/edit.php. Without the jquery-ui I got the javascript errors TypeError: $.datepicker is undefined and TypeError: $(...).datepicker is not a function

I'd submit a pull request but I'm not sure if it makes more sense to add them to admin/handlers/util/datewidget.php or to cli/views/crud-app/types/date.html and cli/views/crud-app/types/datetime.html or somewhere else.


  • I'm also getting an error when editing a record because the newly-created edit form doesn't include the id field. Adding <input type="hidden" name="id" value="{{ id|quotes }}" /> fixes it.

Sign In or Register to comment.