Skip to main content

Search and Top Navigation

#6845 closed enhancement (wontfix)

Opened January 11, 2011 10:50PM UTC

Closed January 12, 2011 12:50AM UTC

Last modified January 12, 2011 12:09PM UTC

add today text to left of datepicker button

Reported by: sfriedman Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.7
Keywords: Cc:
Blocked by: Blocking:
Description

The following patch (against 1.8.7) adds the text 'Today' to the left of the button to enable quick selection of 'today'.

--- jquery.ui.datepicker.js.bak 2010-12-10 05:39:12.000000000 -0500

+++ jquery.ui.datepicker.js 2011-01-11 17:43:03.000000000 -0500

@@ -191,6 +191,9 @@

}).bind("getData.datepicker", function(event, key) {

return this._get(inst, key);

});

+ if (this._get(inst,'showToday')) {

+ input.after('<a onclick="$(\\'#'+$(input).attr('Id')+'\\').val($.datepicker.formatDate(\\'yy

-mm-dd\\', new Date()))">this._get(inst,'todayText')</a>');

+ }

this._autoSize(inst);

$.data(target, PROP_NAME, inst);

},

Attachments (0)
Change History (2)

Changed January 12, 2011 12:50AM UTC by scottgonzalez comment:1

resolution: → wontfix
status: newclosed

You can do this on your own.

Changed January 12, 2011 12:09PM UTC by sfriedman comment:2

I did this on my own. But, the purpose of these widgets is to do common cases easily. We believe that this feature is a common need.