#8191 closed enhancement (notabug)
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 settings
function 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.
Change History (5)
comment:1 follow-up: 2 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Replying to 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!
comment:3 Changed 11 years ago by
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
comment:4 Changed 11 years ago by
Thanks, now I understand current situation better!
Do you have any milestones for rewrite process? Last commit to datepicker
branch was 4 months ago... No progress last time, or this branch does not reflect current activity?
No. Datepicker is for working with dates, not times.