Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Init-Date in UIBootstrap datePicker

I'm currently working on a angular datepicker. To do so, I use the UIBootstrap datepicker. But I'm facing a problem. I need to use the init-date attribute :

init-date : The initial date view when no model value is specified.

The attribute seems to be available only on the datepicker directive. The fact is that I sue the popup datepicker and not the datepicker himself. There is the html for the datepicker-popup

Html

<input type="text" class="form-control "  datepicker-popup="dd/MM/yyyy" ng-model="date"  is-open="opened" datepicker-options="dateOptions" />
  <span class="input-group-btn">
    <button type="button" class="btn btn-default" ng-click="openCalendar($event)"><i class="glyphicon glyphicon-calendar"></i></button>
  </span>

I want to know If there is something like the init-date for the popup-datepicker. I had thougth about the datepicker-options but I wasn't capable of doing something who works with this idea. Nevertheless, is it possible to make it works with this datepicker-options ?

like image 407
Pierre-Alexandre Moller Avatar asked Aug 22 '26 00:08

Pierre-Alexandre Moller


1 Answers

Well It was definitely on the datepicker-options but it doesn't works because of a problem due to a bug in angular-ui-bootstrap 0.12.1.0. This problem is solve in the latest version of angular-ui-bootstrap (0.13.0)

like image 177
Pierre-Alexandre Moller Avatar answered Aug 24 '26 16:08

Pierre-Alexandre Moller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!