Search and Top Navigation
#8191 closed enhancement (notabug)
Opened March 13, 2012 07:57PM UTC
Closed March 13, 2012 08:24PM UTC
Last modified March 13, 2012 10:21PM UTC
Add custom format tokens to parseDate() function
Reported by: | parshin | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.datepicker | Version: | 1.8.18 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Is it possible to add user-defined parsers to process additional tokens in format string?
One of possible use cases is parsing of time together with date. For example, parse
"2012.03.13 23:19"with format
"yy.mm.dd hh:mm", where
"hh"and
"mm"are additional format tokens (with corresponding user-defined parsers).
Technically it can be implemented as new attribute of
settingsfunction parameter.
I can try to implement this enhancement, but before want to know what datepicker's maintainers think about this idea in whole and particularly about the best implementation.
Attachments (0)
Change History (5)
Changed March 13, 2012 08:24PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Changed March 13, 2012 09:03PM UTC by comment:2
Replying to [comment:1 scott.gonzalez]:
No. Datepicker is for working with dates, not times.
My idea is not to add parsing of time or other non-date information into datepicker, but to add some possibilities to extend widget functionality. Time information handling is just an example of such extension.
Support of used-defined tokens parsing will not add any new end-user feature into datepicker, but will simplify its customization or writing extensions (plugins?) to the widget.
What is your position on datepicker extendability? Should it provide some kind of interfaces for developers to write extensions/plugins, or it should be just finalized end-user widget?
Thanks in advance for answers!
Changed March 13, 2012 09:40PM UTC by comment:3
Everything in UI should be extensible. BUT, absolutely nothing should be added to datepicker right now. We're in the middle of a rewrite. Feel free to check out https://github.com/jquery/jquery-ui/tree/datepicker/datepicker-rewrite and propose features on http://wiki.jqueryui.com/Datepicker
Changed March 13, 2012 10:16PM UTC by comment:4
Thanks, now I understand current situation better!
Do you have any milestones for rewrite process? Last commit to
datepickerbranch was 4 months ago... No progress last time, or this branch does not reflect current activity?
Changed March 13, 2012 10:21PM UTC by comment:5
It is not a priority right now: http://wiki.jqueryui.com/Roadmap
No. Datepicker is for working with dates, not times.