2

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.

Agat
  • 4,577
  • 2
  • 34
  • 62
Wonderingly
  • 41
  • 2
  • 3

1 Answers1

1

Just use custom (and cool) date/time pickers from Windows Phone Toolkit like here.

Agat
  • 4,577
  • 2
  • 34
  • 62