SfNumericTextBox not updating the bound property when moving initial date in SfCalendar

Using SfCalendar and SfNumericTextBox version 19.2.0.62

I have a view in Xamarin Forms 5.0 that has an SfNumericTextBox bound to a nullable int and has AllowNulls = True

We also have an SfCalendar control bound to a DateTime field in the same ViewModel

  1. Initial View and ViewModel loads
  2. Edit value in Numeric Text box. ViewModel property does not get changed
  3. Tap a different date in the calendar control. Bound Current date property is updated but bound nullabale int does not get updated
  4. Tap another date in the calendar control. Bound Current date property is updated AND now the nullanble into property gets updated.
We need the binding of the numeric textbox to update at step 3 when the first Date is changed.

If the keybaord is dismissed before moving to the new date the binding is updated. Can the NumericTextbox be configured to update the binding on LostFocus?

Why doesn't it?

Thanks



3 Replies

AJ AhamedAliNishad JahirHussain Syncfusion Team May 31, 2023 10:40 AM UTC

Hi Pat,

 

We have reviewed your query and prepared a sample based on your replication steps. In the sample, we have used the SfNumericTextBox and SfCalendar controls. We have bound the Value property of the SfNumericTextBox to a Nullable int property in the ViewModel, and the SelectedDate property of the SfCalendar to a DateTime property in the ViewModel.

 

When changing the date in the calendar, we update the year value in the NumericTextBox. By setting the ValueChangeMode to "OnKeyFocus" in NumericTextBox, the ViewModel property of the NumericTextBox gets updated when editing the NumericTextBox.

 

Could you please share, How would you like to display the inputs in the NumericTextBox? Are you displaying only the year or the full date?

 

Kindly find the sample attached. Please let us know if you need any additional details.

 

Regards,

Ahamed Ali Nishad.


Attachment: SfNumericBound_f1518b8b.zip


PL Pat Long June 6, 2023 05:22 PM UTC

Thank you. The update of  ValueChangeMode workd perfectly. 



PR Preethi Rajakandham Syncfusion Team June 7, 2023 05:17 AM UTC

Hi Pat Long,

You're welcome. We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help.

Regards,

Preethi R


Loader.
Up arrow icon