#6845 closed enhancement (wontfix)
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);
},
Change History (2)
comment:1 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
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.
You can do this on your own.