Search code examples
phpgrocery-crud

How to add a time picker to grocery crud


I have two types of date time fields in my database. DATE and TIME. With the DATE field Grocerycrud gives you a date picker when adding a record. With the TIME field Grocerycrud only gives you a text field.

Is there any way to get Grocerycrud to show a time picker for TIME fields?


Solution

  • Use a datetime field instead and you'll get the datepicker and timepicker altogether.

    If you wish to use only time fields you'll have to modify GC. This is not the correct way to extend GC but as development seems stopped I guess its ok.

    Follow the instrucction from this post: http://www.grocerycrud.com/forums/topic/1573-timepicker-implementation/#entry11462