ui-date icon indicating copy to clipboard operation
ui-date copied to clipboard

minDate after date value - changes the date!

Open royts opened this issue 12 years ago • 3 comments

Hi, I'm trying to use this great directive, but I'm facing a problem with the minDate option.

In a simple jQuery UI datePicker, when the minDate is after the selected date, if effect only the calendar when selecting the date.

See this example: http://jsfiddle.net/psifasim/7Ubd4/ In this example you can see that the minDate effects the datePicker when changing the date, but does not change the input value.

When using ui-date with a minDate which is after the date value - the date is being changed to the minDate - see an example with the same dates:

http://jsfiddle.net/psifasim/7Ubd4/

This prevents me from using the minDate option.

Am I using it wrong or is it a bug?

royts avatar Aug 01 '13 08:08 royts

I have the following code: div input(ng-model="new_event_start", ui-date="{ minDate: today, maxDate: new_event_end }", required,type="text",placeholder="Event Start Date",id="start_date") div input(ng-model="new_event_end", ui-date="{ minDate: new_event_start || today }", type="text",required,placeholder="Event End Date",id="end_date")

I'm unable to set the end date :(

mikepc avatar Aug 09 '13 04:08 mikepc

@royts I get the same problem

Did you manage to fix this?

cbordei avatar Sep 29 '14 14:09 cbordei

No I never did get it to work, had to change the design

mikepc avatar Sep 29 '14 19:09 mikepc