HEllo,
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
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-types.html
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.
Thanks,
Sergio