Opened 12 years ago

Last modified 9 years ago

#6885 open feature

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:


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.

Change History (8)

comment:1 Changed 12 years ago by Evil Raat

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.

comment:2 Changed 11 years ago by ruslan

I also need this event to apply advanced formatting. It can be added to the end of the _updateDatepicker function.

comment:3 Changed 11 years ago by Pony


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) {
		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.

comment:4 Changed 11 years ago by Scott González

Type: enhancementfeature

comment:5 Changed 10 years ago by Scott González


comment:6 Changed 10 years ago by mikesherov

Status: newopen

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

Milestone: 1.11.0none

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

This should just be implemented as an open event to match other widgets. The beforeShow callback will be removed.

Note: See TracTickets for help on using tickets.