Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap datepicker

I'm trying to get bootstrap datepicker to highlight the date selected on the dropdown date picker. It's not currently doing this.. What am I missing?

<div class="input-append date" id="datepicker" data-date="dateValue: Customer.DateOfBirth" data-date-format="dd-mm-yyyy">
    <input class="span2" size="16" type="text" data-bind="value: Customer.DateOfBirth" readonly="readonly" />
    <span class="add-on"><i class="icon-calendar"></i></span>
</div>
like image 323
web-boy Avatar asked Nov 14 '12 11:11

web-boy


People also ask

Is there a bootstrap Datepicker?

As with bootstrap's own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, simply set data-provide="datepicker" on the element you want to initialize, and it will be intialized lazily, in true bootstrap fashion.

Does bootstrap 5 have a Datepicker?

Bootstrap 5 Datepicker. Date picker is a plugin that adds the function of selecting time without the necessity of using custom JavaScript code.

Does bootstrap 4 have a Datetimepicker?

Bootstrap 4 compatible Datetimepicker with Material Design UI. Datetimepicker component allows user to select a date from a calendar and time from a visual analog clock; it also accepts values via direct input. You can find a variety of date and time picker examples here.

Does bootstrap have a time picker?

Bootstrap time picker is a jQuery plugin which allows the user to select a time in the Bootstrap form without the necessity of using custom JavaScript code.


1 Answers

You have to call the datepicker via javascript $('#datepicker').datepicker();​.

To hightlight the date selected, just include datepicker.css

Code Example / Result

  • Updated bootstrap.css
like image 148
agriboz Avatar answered Oct 04 '22 15:10

agriboz