Hello,
i have problem with rolling DateTime back, in changed event function. Here i have example
<syncfusion:DateTimeEdit x:Name="DateTimeEdit" Height="25" Width="180" FontSize="14" CultureInfo="cs-CZ" IsEmptyDateEnabled="False" DateTimeChanged="DateTimeChanged" Pattern="YearMonth" DisableDateSelection="True" />
And changed function
private void DateTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Console.WriteLine(e.NewValue);
this.DateTimeEdit.DateTimeChanged -= DateTimeChanged;
this.DateTimeEdit.DateTime = (DateTime?)e.OldValue;
this.DateTimeEdit.DateTimeChanged += DateTimeChanged;
}
For example:
First step: if i choose April 2016, date rolling back, everything is ok.
Second step: if i choose April 2016 again, event have not been called. I must choose another month.
This function is important, because in changed function is validation proccess (in my case data comparation and save data check).
Thanks for answers