Ticket #4131 (closed feature: fixed)

Opened 19 months ago

Last modified 13 months ago

Could weeknumbers added to the Datepicker

Reported by: ZeroMD Owned by:
Priority: trivial Milestone: 1.next
Component: ui.datepicker Version: 1.6rc6
Keywords: Week numbers Cc:

Description

The datepicker is a great component, but I'm missing week numbers

Attachments

datepicker_showWeeks.diff Download (1.9 KB) - added by hub 18 months ago.
Feature to show week numbers

Change History

Changed 19 months ago by kbwood

Week numbers are still available in the original datepicker -  http://keith-wood.name/datepick.html.

Changed 18 months ago by hub

Feature to show week numbers

Changed 18 months ago by hub

Here's that feature.

Use it like this: $("#datepicker").datepicker({showWeekNumbers: true, firstDay:1});

ISO week numbers starts on mondays, so this feature should not be used with firstDay=0.

Also apply the week number fix: http://dev.jqueryui.com/ticket/4285

Changed 16 months ago by joern.zaefferer

  • milestone changed from TBD to 1.next

Changed 15 months ago by catallist

I've done this and it's great. One issue is when you get to January 2010 it says week one is week 53 of the previous year.

Can this be fixed at all?

Changed 14 months ago by kbwood

This is correct as it stands. The  ISO 8601 standard defines the first week of the year as "the week with the year's first Thursday in it". Hence week 1 of 2010 starts on Jan 4 and contains Thursday Jan 7. Jan 1 to 3 are relegated to the last week of the previous year.

Changed 14 months ago by bdaniel7

hi, when is this patch gonna be included in the datapicker-stable?

Changed 13 months ago by kbwood

  • status changed from new to closed
  • resolution set to fixed

Fixed in r3004, including localisation of the column header. Added a demonstration of the datepicker showing week of the year.

Note: See TracTickets for help on using tickets.