Datetime Picker

1

I'm using this datetimer picker datetimepicker The date appears like this: 2018 January 30 - 10:00 and I want it to look like this: 2018-01-30 10:00

Can you do it in jquery or do I need to change it directly in the datetime picker code?

    
asked by anonymous 30.01.2018 / 20:56

1 answer

2

The component has an option to format the date and time:

$("ID OU CLASSE DO CAMPO").datetimepicker(
   {format: 'yyyy-mm-dd hh:ii'}
);

Where:

yyyy -> ano
  mm -> mês
  dd -> dia
  hh -> horas
  ii -> minutos

You can see the full options in component documentation .

    
30.01.2018 / 21:28