ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Replace the current custom datepicker with the one shipped with jQuery UI (Feature #817)


Added by Holger Just at 2012-01-05 09:37 am. Updated at 2012-07-15 03:38 pm.


Status:Closed Start date:2012-01-05
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:User interface
Target version:3.3.0
Remote issue URL: Affected version:

Description

jQuery UI ships with a standard datepicker which could replace the current datepicker which is patched and has no possibility to be upgraded as the upstream project went commercial some time ago.


Related issues

related to Bug #1121: Date Picker Icons disappear when changing the Tracker Closed 2012-08-16
duplicated by Feature #951: Replace calendar with jQueryUI date picker Duplicate 2012-03-25
blocked by Feature #1018: Switch to an HTML5 doctype Closed 2012-05-23
blocked by Feature #1054: Include modernizr JS Closed 2012-07-02

Associated revisions

Revision 522b9e6b
Added by Jean-Philippe Lang at 2008-03-09 12:39 pm

Display date/time instead of date on files list (#817).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1215 e93f8b46-1217-0410-a6f0-8f06a7374b81

Revision cb9ac281
Added by Felix Schäfer at 2012-07-15 03:19 pm

Add date_field and date_field_tag form helpers #817

History

Updated by Eric Davis at 2012-01-12 10:49 pm

Looks like it supports i18n too. Just need to make sure it handles Monday/Sunday as the start of the week.

Updated by Tom Rochette at 2012-02-15 05:09 am

Eric Davis wrote:

Looks like it supports i18n too. Just need to make sure it handles Monday/Sunday as the start of the week.

It sure does handle monday/sunday as first day of the week. The date picker needs to be initialized with firstDay:

$( ".selector" ).datepicker({ firstDay: 1 }); // Initialize with first day as Monday

See: http://jqueryui.com/demos/datepicker/#option-firstDay

Updated by Felix Schäfer at 2012-02-15 12:20 pm

And it seems it supports formatting the date in the textfield, as well as mirroring the result in a second field, so we could format the field shown to the user according to the user preferences and still send it formatted so that rails understands it in the background.

Updated by Andrew Smith at 2012-06-16 06:00 am

I completely forgot to comment on here when I created the Pull Request on GitHub - https://github.com/chiliproject/chiliproject/pull/174

The current version just replaces keeping the same functionality. It would be very simple to also support showing the date in the users format by changing this line (and adding a hidden field)

https://github.com/chiliproject/chiliproject/pull/174/files#L0R928

Should that part of a different PR/commit though?

Updated by Felix Schäfer at 2012-06-16 04:34 pm

Andrew Smith wrote:

Should that part of a different PR/commit though?

I think separate "jQuery replacement" and "enhancement made possible in the jQuery version" issues would be better indeed.

Updated by Felix Schäfer at 2012-06-16 04:35 pm

Furthermore, I'll try to have a look at this beginning of next week, thanks :-)

  • Assignee set to Felix Schäfer
  • Target version set to 3.3.0
  • Status changed from Open to Ready for review

Updated by Felix Schäfer at 2012-06-21 09:51 pm

For the record: Reviewed the pull request, it needs some little improvements but is generally a step in the right direction. (and I can't assign it back to Andrew -_-")

  • Status changed from Ready for review to Open
  • Assignee deleted (Felix Schäfer)

Updated by Andrew Smith at 2012-06-25 12:56 pm

after talking on IRC mentioned backporting RoR4 date fields and using that instead of needing to add a class to the fields.

  • Assignee set to Felix Schäfer

Updated by Felix Schäfer at 2012-06-26 12:17 pm

For the record: for forward compatibility (to avoid having to change stuff down the line) it was decided to work with the html5 date input fields (that will also be available in Rails 4) instead of a html-class-based approach to find date input fields and add a calendar to them. As Rails 2 (and probably 3) don't provide the necessary functionality for date fields though, they have been backported to be part of this change.

One important note: this means #1018 is a blocker for this issue though as the date type is not valid html4.

Updated by Andrew Smith at 2012-06-26 12:46 pm

#1018 should be a simple merge since changing the doctype as in the PR will still trigger standards mode for IE and all other browsers are smart enough to know what's going on.

Using type="date" will just fall back to a text field for any browser that doesn't understand it (even without switching the doctype).

Updated by Felix Schäfer at 2012-07-02 08:31 pm

OK, I think we're on the last stride here, there's two minimal changes I commented on at the pull request and I think we're good to go :-)

  • Assignee deleted (Felix Schäfer)

Updated by Felix Schäfer at 2012-07-15 03:38 pm

Merged in ff94716, thanks!

  • Status changed from Open to Closed

Also available in: Atom PDF