question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CalendarDatePicker - TwoWay binding?

See original GitHub issue

Is your feature request related to a problem? Please describe. I am not sure if this is a bug / a feature request or just by design, so I let you judge.

If you bind to SelectedDate you always have to specify that the binding needs to be TwoWay, in order to update your ViewModel. I almost always forget to set this, so I end up wondering whats going on until I remember to update my binding.

<CalendarDatePicker SelectedDate="{Binding MyDate, Mode=TwoWay}" />

Describe the solution you’d like IMO SelectedDate should bind TwoWay by default

Describe alternatives you’ve considered Keep it was it is, and just remember it better ^^

Additional context I think in WPF it is also TwoWay. I can send a PR if you find this should be implemented. If not, please close this as by design.

Happy coding Tim

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Feb 18, 2022

@robloo but it’s CalendarDatePicker. In most scenarios it actually expected to do changes to their view models.

0reactions
robloocommented, Feb 19, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't bind CalendarDatePicker to a model in Xaml UWP
As the error says you need a converter - CalendarPicker.Date is of type Nullable<DateTimeOffset> and your property is DateTime .
Read more >
Data Binding in Blazor DatePicker Component
Two-way binding can be achieved by using bind-Value attribute, which supports string, int, Enum, DateTime, bool types. If the component value has been...
Read more >
Functions in x:Bind - UWP applications
In a two-way binding scenario, a second function must be specified for the reverse direction of the binding. This is done using the...
Read more >
CalendarDatePicker control for Universal apps - daniel vistisen
The date selected on the CalendarDatePicker. Does of course support two-way bindings so it will change the date should it change on the...
Read more >
Uno Support for x:Bind
Uno supports the x:Bind WinUI feature, which gives the ability to: ... <CalendarDatePicker Date="{x:Bind sys:DateTime.Parse(TextBlock1.Text)}" />.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found