Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7093 closed bug (duplicate)

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);
	},

Change History (2)

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

Resolution: duplicate
Status: newclosed

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

Duplicate of #4045.

Note: See TracTickets for help on using tickets.