Can you help me how to insert date values into the database? For example, today is October 9, 2023 but I want to select the value October 20, 2023 into the database, what should I do? While in Grocery CRUD Enterprise, the add form does not allow datepicker input, giving me a choice as shown in the attached image.
post by phamtungvnp on Oct 9, 2023
post by johnny on Oct 10, 2023
Hello @phamtungvnp ,
Can you send us the function on your Controller that you use? Date fields should work out of the box. Also maybe try fieldType to add native_date instead?
Regards
Johnny
post by phamtungvnp on Oct 10, 2023
post by johnny on Oct 11, 2023
Hello @phamtungvnp ,
Seems that you are missing the fieldType from what I see from your code. For example:
$crud->fieldType('ngaynhan_dukien', 'datetime');
If this still doesn’t work for you then try:
$crud->fieldType('ngaynhan_dukien', 'native_datetime');
Regards
Johnny
post by phamtungvnp on Oct 11, 2023
Hello @johnny
The above code helped me solve the problem. Thank you very much.
New & Unread Topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Use callbackColumn() but keep inline edit functionality |
|
3 | 649 | Apr 12 |
| Setting quick search values via JavaScript not working properly for booleans |
|
0 | 563 | Nov 2025 |
| callbackColumn() has not effect in v3.2.6 Enterprise |
|
2 | 696 | Dec 2025 |
| displayAs() doesn’t support new line in headings |
|
4 | 873 | Jan 5 |
| Inline edit has problems if the column width is set |
|
2 | 843 | Feb 28 |


