Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#7419 closed defect (duplicate)

setValue function doesn't work correctly on DojoX Widget Calendar

Reported by: Aurelijus Owned by: dante
Priority: high Milestone: 1.3
Component: DojoX Widgets Version: 1.1.1
Keywords: calendar, dojox, bug, widget Cc: sos
Blocked By: Blocking:

Description

Hi,

here is the problem. After the page is loaded, calendar shows todays date (by showing correct month, year and highlighting a day) and then instantly changes to the month and year from dateObject (in this place it does almost what I want). However, after the month and year is changed the correct day is not highlighted, instead todays day stays unchanged.

Javascript:

	<script type="text/javascript">
			dojo.require("dojo.parser");	// scan page for widgets and instantiate them
			dojo.require("dojo.date.stamp");
			
			var dateObject = new dojo.date.stamp.fromISOString('2008-07-11');
			dojo.addOnLoad(function(){
				
				var Calendar = dijit.byId('cal');
				Calendar.setValue(dateObject);
				
			});
		</script>

Html:

	<div dojoType="dojox.widget.Calendar" id="cal"></div>

Attachments (1)

dojox_Calendar_selected_date_highlight.patch (1.2 KB) - added by Shane O'Sullivan 11 years ago.
patch to fix this issue, contains attr method to replace setValue

Download all attachments as: .zip

Change History (3)

comment:1 Changed 11 years ago by dante

Cc: sos added
Milestone: tbd1.3

Changed 11 years ago by Shane O'Sullivan

patch to fix this issue, contains attr method to replace setValue

comment:2 Changed 11 years ago by dante

Resolution: duplicate
Status: newclosed

closing in favor of #8169 - which addresses this issue. see also #6627

hopefully by 1.3, this .attr() will be safe and documented.

Note: See TracTickets for help on using tickets.