I have a raddatetimepicker in my application. When I open the pop-up it will show the days of the months.. and the last days of the last month and the first days of the next month.
Lets say that the date already selected i 24th november 2011. When I open the pop-up, I can select the 2nd december without changing the month. That works.. but if I double-click on the 2nd december, it chooses 30th december, not 2nd.
I have implemented the mousedoubleclick event:
void RadDateTimePicker_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (((RadDateTimePicker)sender).IsDropDownOpen)
((RadDateTimePicker)sender).IsDropDownOpen = false;
else if (((RadDateTimePicker)sender).SelectedValue == null)
((RadDateTimePicker)sender).SelectedValue = DateTime.Now;
e.Handled = true;
}
The selected value is the 30th december, not the 2nd december in the mousedoubleclick-handler.
It there any way to make sure that a doubleclick selects the intended date (and closes the pop-up-dialog)?
This error only appears when the popup dialog shows a specific month and I click on the "grey-out" dates in the surounding months.
Lets say that the date already selected i 24th november 2011. When I open the pop-up, I can select the 2nd december without changing the month. That works.. but if I double-click on the 2nd december, it chooses 30th december, not 2nd.
I have implemented the mousedoubleclick event:
void RadDateTimePicker_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (((RadDateTimePicker)sender).IsDropDownOpen)
((RadDateTimePicker)sender).IsDropDownOpen = false;
else if (((RadDateTimePicker)sender).SelectedValue == null)
((RadDateTimePicker)sender).SelectedValue = DateTime.Now;
e.Handled = true;
}
The selected value is the 30th december, not the 2nd december in the mousedoubleclick-handler.
It there any way to make sure that a doubleclick selects the intended date (and closes the pop-up-dialog)?
This error only appears when the popup dialog shows a specific month and I click on the "grey-out" dates in the surounding months.