Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

minDate after date value - changes the date! #28

Open
royts opened this issue Aug 1, 2013 · 3 comments
Open

minDate after date value - changes the date! #28

royts opened this issue Aug 1, 2013 · 3 comments

Comments

@royts
Copy link

royts commented Aug 1, 2013

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?

@mikepc
Copy link

mikepc commented Aug 9, 2013

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 :(

@cbordei
Copy link

cbordei commented Sep 29, 2014

@royts I get the same problem

Did you manage to fix this?

@mikepc
Copy link

mikepc commented Sep 29, 2014

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants