Project

General

Profile

Actions

Defect #13260

closed

JQuery Datepicker popup is missing multiple month/year modifiers

Added by Zach La Celle about 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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 improvementsClosed

Actions
Actions #1

Updated by Mischa The Evil about 11 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?

Actions #2

Updated by Etienne Massip about 11 years ago

  • Target version set to Candidate for next major release
Actions #3

Updated by Jan Niggemann (redmine.org team member) about 11 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 :-)

Actions #4

Updated by Daniel Felix about 11 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. :-)

Actions #5

Updated by Jean-Philippe Lang about 11 years ago

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

Added in r11663.

Actions #6

Updated by Adrian Harris about 10 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]]

Actions

Also available in: Atom PDF