Reputation: 41
Is it possible to have a hidden date picker in windows phone and show it with a button. I have this code
InitializeComponent();
this.datePicker1.ValueChanged += new EventHandler<DateTimeValueChangedEventArgs>(datePicker1_ValueChanged);
DateTime date = DateTime.Today;
button1.Content = date.ToShortDateString();
...
private void datePicker1_ValueChanged(object sender, DateTimeValueChangedEventArgs e)
{
DateTime date1 = (DateTime)e.NewDateTime;
button1.Content = date1.ToShortDateString();
}
but how do I launch the date picker with the button.
Upvotes: 2
Views: 4720
Reputation: 4779
Just use custom (and cool) date/time pickers from Windows Phone Toolkit like here.
Upvotes: 1