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

Change regex for dateparser format 'd' and 'M' to allow for leading zeros and fix regex for 'M' format #3008

Closed
dkuerner opened this issue Nov 24, 2014 · 7 comments

Comments

@dkuerner
Copy link

Allow leading zeros for day and month for format d and M
Use case:
Format d.M.y should allow for entering dates like 02.05.12 and like 2.5.12
This format is very common.

In addition, the regex for 'M' is incorrect. The order of the alternation should be changed.

dkuerner added a commit to dkuerner/bootstrap that referenced this issue Nov 24, 2014
@rvanbaalen rvanbaalen added this to the Backlog milestone May 31, 2015
@cleftheris
Copy link

This is true I had the same issue. @dkuerner please make a pull request with your commit so that the someone from the team can review/merge. (hope sometime soon 👍 )

dkuerner added a commit to dkuerner/bootstrap that referenced this issue Jul 6, 2015
@wesleycho wesleycho modified the milestones: Purgatory, Backlog Aug 1, 2015
@wesleycho
Copy link
Contributor

We are not interested in supporting this at this point in time - the dateparser currently aims to support the behavior found in Angular's dateFilter.

@cleftheris
Copy link

Are you serious. Filters are meant primarily for presenting data not user input. Try putting a date picker on an input type text and explain to the user why is 1/2/2015 is not a valid date. IMHO this is a bug

@wesleycho
Copy link
Contributor

Nothing is stopping you from overwriting the dateparser factory to implement your own custom parser.

That type of attitude though is unwarranted and unprofessional.

@cleftheris
Copy link

My sincere apologies for my outburst.

@wesleycho
Copy link
Contributor

You'll be happy to know @cleftheris that I figured out a good implementation for this feature, and it will make it shortly to master - see #4809 :) .

@cleftheris
Copy link

@wesleycho thanks much appreciated. Although currently I have overridden the DateParser as you suggested and works quite well I will switch back to default in order to get updates as soon as it gets merged.

cheers

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