I’m using dojo’s DateTextBox with a connected onChange event.
There are cases users select the same day as already selected, which unfortunately (but of course logically) doesn’t fire an onChange event. But I still need to trigger the onChange-connected actions regardless of whether the user selected the same value again or did not.
Is there any way to connect events to single/all DateTextBox days bypassing the onChange event of the box? I think the days aren’t widgets themselves. An even better option would be some kind of onSelect event for DateTextBox, which apparently doesn’t exist…
You need to connect to
onChangeevent on popup calendar, notDateTextBox. The problem is that every time you open calendarDateTextBoxdestroys previously shown instance and creates new instance ofdijit.Calendar(referenced inDateTextBox.dropDownproperty).So you need to connect to
DateTextBox.openDropDown()method to create connect toDateTextBox.dropDown.onChange(), i.e.Calendar.onChange():See this example in action at jsFiddle.