- This topic has 4 replies, 2 voices, and was last updated 8 months, 3 weeks ago by .
I created my custom table
MB_Custom_Table_API::create( ‘articulos’, array(
‘fecha_inicio_evento’ => ‘DATE’,
And the custom field:
array ( 'id' => 'fecha_inicio_evento', 'type' => 'date', 'name' => 'Fecha Inicio', 'js_options' => array( 'dateFormat' => "dd-mm-yy", ), 'columns' => 6, ),
In the front end it looks well, you can select the date and see 25-10-2018 for example, but in the database is stored like this 0000-00-00.
I see that this is the format of mysql date
But how can I do to save the date well?
If I change the format in the database:
‘fecha_inicio_evento’ => ‘VARCHAR (64)’,
The date is saved with the frontend format, but don’t know if is the best way to save a date in a varchar field.
- You must be logged in to reply to this topic.