Opened 11 years ago

Closed 10 years ago

Last modified 7 years ago

#4131 closed feature (fixed)

Could weeknumbers added to the Datepicker

Reported by: ZeroMD Owned by:
Priority: trivial Milestone: 1.8a1
Component: ui.datepicker Version: 1.6rc6
Keywords: Week numbers Cc:
Blocked by: Blocking:

Description

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

Attachments (1)

datepicker_showWeeks.diff (1.9 KB) - added by hub 11 years ago.
Feature to show week numbers

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by kbwood

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

Changed 11 years ago by hub

Attachment: datepicker_showWeeks.diff added

Feature to show week numbers

comment:2 Changed 11 years 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

comment:3 Changed 11 years ago by Jörn Zaefferer

Milestone: TBD1.next

comment:4 Changed 11 years 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?

comment:5 Changed 10 years 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.

comment:6 Changed 10 years ago by bdaniel7

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

comment:7 Changed 10 years ago by kbwood

Resolution: fixed
Status: newclosed

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

comment:8 Changed 7 years ago by Scott González

Milestone: 1.next1.8a1
Note: See TracTickets for help on using tickets.