Gillardo / bootstrap-ui-datetime-picker

AngularJs directive to allow use of the bootstrap UI date/time pickers in a single dropdown
MIT License
306 stars 168 forks source link

minDate and maxDate don't work properly #145

Open mazavr opened 8 years ago

mazavr commented 8 years ago

I used DEMO page.

If you use "Today" button in both cases you may break the limitation minDate <= maxDate.

fromtogif

Gillardo commented 7 years ago

Upon further investigation it appears that the ngModel is being set to undefined, but it aint in this component, but i think it is from the angular-ui datepicker (which is used by this component). It maybe worth trying to recreate a demo using the datepicker-popup angular-ui component, as i believe you can replicate it. If so, this will prove that it is the underlying component, not this one

RamChandraTeja commented 7 years ago

can't we directly use min-date in html and assign the date using $watch or ng-change ?

example: <input type="text" datetime-picker="MM yyyy" ng-model="picker.someDate" datepicker-options="picker.datepickerOptions" enable-time="false" min="date assigned to some scope var via $watch" button-bar="picker.buttonBar" is-open="picker.open"/>

Gillardo commented 7 years ago

What is the state of play with this issue? Is it replicated with the original datepicker-popup from angular-bootstrap?