sweeta pandey

sweeta pandey

  • NA
  • 68
  • 5.4k

How do you assign a datepicker from a textbox?

Oct 20 2022 1:00 AM

I would like to have the user input a date in one datepicker, then underneath input the number of weeks between the two dates. The second datepicker will then assign that date weeks, days or years later.

What I have tried:

I have the two datepickers and the textbox:
<datepicker x:name="Date1"
="" focusable="False" displaydate="01/01/2022" displaydatestart="01/01/2022" displaydateend="12/31/2022" istodayhighlighted="True">


<textbox x:name="Text 1"
="" tooltip="Enter the number of weeks between dates" background="AliceBlue" borderbrush="Black" borderthickness="2" textalignment="Center" horizontalalignment="Stretch">

<datepicker x:name="Date2"
="" focusable="False" displaydate="01/01/2022" displaydatestart="01/01/2022" displaydateend="12/31/2022"


Answers (1)