Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard DateFormat/Localization Support #39

Open
AlexandreArpin opened this issue Jun 25, 2013 · 1 comment
Open

Standard DateFormat/Localization Support #39

AlexandreArpin opened this issue Jun 25, 2013 · 1 comment

Comments

@AlexandreArpin
Copy link

Currently, the DateFormat is pretty much baked inside the plugin, with no standard compliance with Localisation and JQuery UI Datepicker.

The way I see it, this plugin should be compatible with JQuery UI Datepicker options and Localisation support (through the i18n plugins)

Which would mean:

  • Short Month Names and Long Month names inside the plugin.
  • Standard DateFormat support (which would mean the day could be included)
  • Year Suffix

(And probably some other things, I am not an expert with Localisation...)

I do not think MonthPicker should depends on the JQuery UI Datepicker plugin, but it'd be nice if their options would be compatible.

Ideally, I would be able to do something like this:

 var options = {
       pattern: $(".datepicker").datepicker("option", "dateFormat");,
       monthNames: $(".datepicker").datepicker("option", "monthNames");
       monthNamesShort: $(".datepicker").datepicker("option", "monthNamesShort");
 };

I realize this might be outside the scope of this plugin, I would appreciate if you could share your vision of this plugin, and if this is the sort of things you'd like to see integrated to it.

@lucianocosta
Copy link
Owner

Yeap! For now, you could do it this way, in initialization:

$('#your_widget').monthpicker({monthNames: $.datepicker._defaults.monthNamesShort});

About pattern, some regex over $.datepicker._defaults.dateFormat would do the trick too.

At a first look, I can't see any constraint in adding this behaviour if $.datepicker is defined.

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

No branches or pull requests

2 participants