Opened 12 years ago

Closed 12 years ago

Last modified 12 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:


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 (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();

Change History (2)

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

Resolution: duplicate
Status: newclosed

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

Duplicate of #4045.

Note: See TracTickets for help on using tickets.