Datetime Picker

Asked

Viewed 106 times

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

You can do it in jquery or I need to change the Picker datetime code directly?

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 complete options on component documentation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.