Skip to main content

Search and Top Navigation

#7093 closed bug (duplicate)

Opened March 10, 2011 08:37AM UTC

Closed March 10, 2011 01:02PM UTC

Last modified March 10, 2011 01:02PM UTC

clicking "Today" does not affect calendar view

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

If I click the "Today" button in the buttonbar, the date value changes, but the calendar does not shows the selected day properly, the last selected day remains active. Can be reproduced at the current demo at http://jqueryui.com/demos/datepicker/#buttonbar

(Chrome 10, OSX 10.6.6)

hint: "patched" this in my local copy of jquery.ui.datepicker.js

	/* Action for current link. */
	_gotoToday: function(id) {
		var target = $(id);
		var inst = this._getInst(target[0]);
		if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
			inst.selectedDay = inst.currentDay;
			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
			inst.drawYear = inst.selectedYear = inst.currentYear;
		}
		else {
			var date = new Date();
			inst.selectedDay = inst.currentDay = date.getDate();
			inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
			inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
		}
		this._notifyChange(inst);
		this._adjustDate(target);
	},
Attachments (0)
Change History (2)

Changed March 10, 2011 01:02PM UTC by scottgonzalez comment:1

resolution: → duplicate
status: newclosed

Changed March 10, 2011 01:02PM UTC by scottgonzalez comment:2

Duplicate of #4045.