Bootstrap Datetimepicker Js Demo


Bootstrap datetimepicker is used for getting time input field as well as date input field with in good style.

There are basic setup:

To initiate Bootstrap Datetimepicker, use following code 

$('selector').datetimepicker();

To set Date Time formate, use following code

$('selector').datetimepicker({
    format: 'DD/MM/YYYY hh:mm:ss A',
});

To place Date & Time Tab side by side use this code

$('selector').datetimepicker({
sideBySide: true });

To change Language use this code

$('selector').datetimepicker({
    locale: 'af' //like ru,af,hi etc
});

see, momentjs for valid locals

To set Default Date & Time use this

$('selector').datetimepicker({
    defaultDate: '5/19/2019 23:03:56',
    format: 'DD/MM/YYYY hh:mm:ss A'
});
View More

Related Elements