Browse Source

Update timePicker value on calendar selection changed

pull/1387/head
farkhutdinova 8 years ago
parent
commit
b402a09fd8
  1. 5
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs
  2. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/UpDownBase.cs
  3. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Implementation/TimePicker.cs

5
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DateTimePicker/Implementation/DateTimePicker.cs

@ -434,6 +434,11 @@ namespace Xceed.Wpf.Toolkit
this.Value = newDate;
}
}
// Update _timePicker Value for correct time choise
if (newDate != null)
{
_timePicker.UpdateValueProperty(newDate.Value);
}
}
}

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/Primitives/UpDownBase.cs

@ -407,7 +407,7 @@ UpDownBase<T> ), new UIPropertyMetadata( true ) );
}
}
private void SetValueInternal( T value )
protected void SetValueInternal( T value )
{
_internalValueSet = true;
try

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/TimePicker/Implementation/TimePicker.cs

@ -392,10 +392,18 @@ namespace Xceed.Wpf.Toolkit
this.ClosePopup( true );
}
#endregion //Event Handlers
#endregion //Event Handlers
#region Methods
public void UpdateValueProperty(DateTime? newValueDateTime)
{
if (newValueDateTime != null)
{
this.SetValueInternal(newValueDateTime);
}
}
private void ValidateTime( TimeSpan time )
{
if( time.TotalHours >= 24d )

Loading…
Cancel
Save