bitfoundation / bitplatform

Build all of your apps using what you already know and love ❤️
https://bitplatform.dev
MIT License
1.08k stars 225 forks source link

how get date and time using bitframework datepicker #210

Closed mokhtarsoholi closed 3 years ago

mokhtarsoholi commented 4 years ago

hi , i using your datepicker persian and it work very well but i cant use date and time when i open date and time picker and choose my date and time and then i need to save this time and date to variable how can i do?

ysmoradi commented 4 years ago

In MVVM approach, you can bind SelectedDateTime into DateTime or DateTimeOffset property, otherwise you can use x:Name (For example BirthDatePicker) and use BirthDatePicker.SelectedDateTime

mokhtarsoholi commented 4 years ago

do you have an example of it?

ysmoradi commented 4 years ago

https://github.com/bitfoundation/bitframework/tree/master/Samples/CSharpClientSamples/Controls.Samples

i need to save this time and date to variable how can i do?

If you know how to save Entry's text property into variable, you can use the same approach for BitDateTimePicker's SelectedDateTime property.