プロジェクト

全般

プロフィール

Vote #73423

完了

JQuery Datepicker popup is missing multiple month/year modifiers

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
70
issue_org_id:
13260
author_id:
72965
assigned_to_id:
0
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
66
ステータス-->[Closed]

説明

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.


journals

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 version#47).

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:

<pre><code class="diff">
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")
</code></pre>

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?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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 :-)
--------------------------------------------------------------------------------
This is a smaller fix which is already given.
I set this to 2.4. :-)
--------------------------------------------------------------------------------
Added in r11663.
--------------------------------------------------------------------------------
Datepicker with every new version changes some options, be very attentive: [[http://basicuse.net/articles/pl/scripting_languages/javascript/jquery_ui_widgets_datepicker_calendar]]

--------------------------------------------------------------------------------


related_issues

relates,Closed,13098,Small datepicker improvements

Admin Redmine さんが約4年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン2.4.0_70 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0