Search and Top Navigation
#6885 open feature ()
Opened January 20, 2011 10:29PM UTC
Last modified July 14, 2014 06:21PM UTC
Add "afterShow" event to datepicker core
Reported by: | bkellgren | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.8.8 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In my current group we are finding the need to extend date picker with an afterShow event. This is the second time I have had to do this for an implementation. Just thought I would suggest this as an enhancement or at least inquire why the decision was made to not include it previously. Thanks in advance, I hope this is the right forum for this request as it is my first.
Attachments (0)
Change History (8)
Changed March 10, 2011 10:18AM UTC by comment:1
Changed November 09, 2011 01:12AM UTC by comment:2
I also need this event to apply advanced formatting.
It can be added to the end of the _updateDatepicker function.
Changed May 03, 2012 12:15PM UTC by comment:3
Hi,
if you need a "afterShow"-event befor version 1.9 you can overwrite the datepicker._updateDatepicker fuction.
for example:
$(function() { $.datepicker._updateDatepicker_original = $.datepicker._updateDatepicker; $.datepicker._updateDatepicker = function(inst) { $.datepicker._updateDatepicker_original(inst); var afterShow = this._get(inst, 'afterShow'); if (afterShow) afterShow.apply((inst.input ? inst.input[0] : null)); // trigger custom callback } });
I know it isn't the best way to slove this problem, but it's better than change the original jquery-ui code.
Changed June 26, 2012 01:22AM UTC by comment:4
type: | enhancement → feature |
---|
Changed October 11, 2012 02:43PM UTC by comment:5
milestone: | 1.9.0 → 1.11.0 |
---|
Changed October 19, 2012 10:09PM UTC by comment:6
status: | new → open |
---|
Changed June 24, 2014 11:52PM UTC by comment:7
milestone: | 1.11.0 → none |
---|
Changed July 14, 2014 06:21PM UTC by comment:8
This should just be implemented as an open
event to match other widgets. The beforeShow
callback will be removed.
I would also like to see this event added to the datepicker. I have been trying to implement a more advanced view of the datepicker for displaying custom content within the date fields.
Adding this event would allow much greater customisation of the rendered datepicker.