Defect #13260
closedJQuery Datepicker popup is missing multiple month/year modifiers
0%
Description
We just upgraded from Redmine 1.4 to Redmine 2.2. Someone noticed that, when changing the "due date" for issues using the calendar pop-up, there is no longer a way to move directly between years: only to move between months. There used to be a second button to click on that would move you forward-backward by year.
Related issues
Updated by Mischa The Evil almost 12 years ago
- Subject changed from Issues calendar popup missing year modifiers to JQuery Datepicker popup is missing multiple month/year modifiers
- Category changed from Issues planning to UI
- Status changed from New to Confirmed
Zach La Celle wrote:
We just upgraded from Redmine 1.4 to Redmine 2.2. Someone noticed that, when changing the "due date" for issues using the calendar pop-up, there is no longer a way to move directly between years: only to move between months. There used to be a second button to click on that would move you forward-backward by year.
Indeed, you're right. That button, and the ability to quickly change month/year using a drop-down menu, was a specific feature provided by the third-party javascript datepicker script called "The DHTML Calendar" (source:trunk/public/javascripts/calendar@10068). Thar script has been replaced with the JQuery Datepicker in r10069, which itself was part of the general switch from Prototype/Scriptaculous to JQuery done for #11445 (Redmine 2.1.0).
The JQuery datepicker however has a comparable feature (http://jqueryui.com/resources/demos/datepicker/dropdown-month-year.html) which can be enabled by setting the changeMonth
and changeYear
booleans to true
in source:trunk/app/helpers/application_helper.rb@11486:
Index: application_helper.rb
===================================================================
--- application_helper.rb (revision 11486)
+++ application_helper.rb (revision head)
@@ -1076,7 +1076,7 @@
"var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
path_to_image('/images/calendar.png') +
- "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};")
+ "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true, changeMonth: true, changeYear: true};")
jquery_locale = l('jquery.locale', :default => current_language.to_s)
unless jquery_locale == 'en'
tags << javascript_include_tag("i18n/jquery.ui.datepicker-#{jquery_locale}.js")
This issue can be considered a regression in functionality IMHO. I'd suggest to enable those two options by default to complete (along with r11335 for #13098) the switch to the JQuery datepicker without losing any features.
Any feedback?
Updated by Etienne Massip almost 12 years ago
- Target version set to Candidate for next major release
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
Mischa The Evil wrote:
This issue can be considered a regression in functionality IMHO. I'd suggest to enable those two options by default
Any feedback?
Yes: You're right :-)
Updated by Daniel Felix almost 12 years ago
- Target version changed from Candidate for next major release to 2.4.0
This is a smaller fix which is already given.
I set this to 2.4. :-)
Updated by Jean-Philippe Lang almost 12 years ago
- Status changed from Confirmed to Closed
- Resolution set to Fixed
Added in r11663.
Updated by Adrian Harris almost 11 years ago
Datepicker with every new version changes some options, be very attentive: [[http://basicuse.net/articles/pl/scripting_languages/javascript/jquery_ui_widgets_datepicker_calendar]]