Defect #13260

JQuery Datepicker popup is missing multiple month/year modifiers

Added by Zach La Celle over 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:2.4.0
Resolution:Fixed Affected version:2.2.2

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

Related to Redmine - Patch #13098: Small datepicker improvements Closed

Associated revisions

Revision 11663
Added by Jean-Philippe Lang over 4 years ago

JQuery Datepicker popup is missing multiple month/year modifiers (#13260).

History

#1 Updated by Mischa The Evil over 4 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?

#2 Updated by Etienne Massip over 4 years ago

  • Target version set to Candidate for next major release

#3 Updated by Jan Niggemann (redmine.org team member) over 4 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 :-)

#4 Updated by Daniel Felix over 4 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. :-)

#5 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Confirmed to Closed
  • Resolution set to Fixed

Added in r11663.

#6 Updated by Adrian Harris almost 4 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]]

Also available in: Atom PDF