'adding DateTime.Now into Xaml file in xamarion.forms
I'm trying to add DateTime.Now in xamarin.forms in xaml Page i wrote this code :
<DatePicker Grid.Column="0" Grid.Row="0" FontSize="Small" Date=DateTime.Now.ToString("dd'/'MM'/'yyyy HH:mm:ss") Format="d"></DatePicker>
But it's gave an error in DateTime.Now.ToString("dd'/'MM'/'yyyy HH:mm:ss")
section, it say :
Invalid value for Priority 'Date' : 'DateTime.Now.ToString' and many other errors appear, how can i solve it ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|