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

M!/d!/yyyy does not Validate in the Dateparser Example #5225

Closed
jlien-calwater opened this issue Jan 12, 2016 · 8 comments
Closed

M!/d!/yyyy does not Validate in the Dateparser Example #5225

jlien-calwater opened this issue Jan 12, 2016 · 8 comments

Comments

@jlien-calwater
Copy link

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

Format defined: M!/d!/yyyy

Failed
image

Expecting:
image

@wesleycho
Copy link
Contributor

I think this is actually a datepicker validation issue - I seem to remember seeing this before with the new format, thought I fixed it but apparently not.

@jeffwhat
Copy link

I'm seeing a similar issue that might be related. When I set the format to 'M!/d!/yyyy' the exclamation points appear in the datepicker input, e.g. "1!/15!/2016". It then does not accept any inputs with prepended zeroes.

Using angular-ui-bootstrap 0.14.3 via webjars. uibDateParser service is injected into app; is there all that needs to be done for it to override the default?

@wesleycho
Copy link
Contributor

@devjeff the ! string fix is in 1.0.3

@jeffwhat
Copy link

thanks @wesleycho; will test out newer version.

@jeffwhat
Copy link

Tested this out with angular 1.48, bootstrap 3.2.0, angular UI bootstrap 1.0.3. Datepicker no longer works; firebug saying "dateParser.fromTimezone is not a function". Any idea what might be breaking?

@wesleycho
Copy link
Contributor

Please post a reproduction in a separate issue - let's not clutter up this issue thread.

@countergram
Copy link

Looks like 428beaf broke this. The `!' are being stripped out of the display format, but it reused the same variable that is used for validation.

@wesleycho
Copy link
Contributor

Looking into this some more, this feature requires a superset of the Angular date filter...this is a mess to fix, but I am in the process of crafting a fix.

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

Successfully merging a pull request may close this issue.

4 participants