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

Datepicker #3976

Closed
johneakin opened this issue Jul 20, 2015 · 6 comments
Closed

Datepicker #3976

johneakin opened this issue Jul 20, 2015 · 6 comments

Comments

@johneakin
Copy link

Hi,
If I manually (via the textbox) set the date back a year
i.e. change 2015 to 2014
then the control shows as invalid (i.e. a red border)

Is there a fix for this?

@wesleycho
Copy link
Contributor

Can you create a reproduction on Plunker - this is not enough to go by or be sure what is happening.

@ChristophT
Copy link

I came across the same problem today. Seems to me, that the baseDate used in dateparser.js, line 130, is supposed to be a date object. If you enter the date manually however it is a string, so the call

year: baseDate.getFullYear(),

fails.

@ChristophT
Copy link

Created a plunkr.
The date is initially set as string. A manual edit in the input box triggers the error. If you select a date via the picker or initialize mydate with new Date() everything works fine.

@RobJacobs
Copy link
Contributor

@ChristophT, @wesleycho The datepicker has these open PRs: #3759, #3691, #3682, #3344, #2513, #2369, #2142 that are related to how the date is parsed. I updated the plunk with the latest build from the master branch so we can test against that.

@wesleycho
Copy link
Contributor

#3759 fixes this.

@johneakin
Copy link
Author

If you go down to the Datepicker here

https://angular-ui.github.io/bootstrap/

and change 2015 in the textbox to 2014 you'll see the red error border around the calendar.
Are we saying this is now fixed?

@wesleycho wesleycho added this to the 0.13.2 (1.4 support) milestone Jul 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants