Firnas
Firnas

Reputation: 389

How to turn off the time selection in the bootstrap datepicker?

I've embed a bootstrap datepicker from http://www.malot.fr/bootstrap-datetimepicker/demo.php

I want only the date and month and year to be displayed. But in this plugin I've date,month,year, and time. How do I remove only the time selection from this datepicker?

Upvotes: 0

Views: 251

Answers (2)

cfnerd
cfnerd

Reputation: 3799

I use a different datetime picker, and have had great success with it. Bootstrap 3 Date/Time Picker. It uses Moment.js and allows for all sorts of date/time formatting options. It is also more accessible, and allows for scrolling through the calendar and time option using a keyboard.

Using the plugin I suggested, the format for just the date would be:

$('.formDate').datetimepicker({
    format: 'MM/DD/YYYY'
});

Upvotes: 0

user784540
user784540

Reputation:

Use DatePicker instead of DateTimePicker.

Upvotes: 1

Related Questions