web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Enter date in a date p...
Power Apps
Answered

Enter date in a date picker with 3 different text boxes

(0) ShareShare
ReportReport
Posted on by 363

I am wanting to input a date in a date picker using a text box for month, day, an year. how would I go about doing this? 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @colbyturybury ,

     

    For that you can use the Month(), Day() and Year() functions:

    txtDay.Text = Day(DatePicker1.SelectedDate)
    txtMonth.Text = Month(DatePicker1.SelectedDate)
    txtYear.Text = Year(DatePicker1.SelectedDate)
  • colbyturybury Profile Picture
    363 on at

    Where do I place this code?

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @colbyturybury  , 

    For the Text property of the label that shows the Day value:

     Day(DatePicker1.SelectedDate) 

    For the Text property of the label that shows the Month value:

    Month(DatePicker1.SelectedDate)

    For the Text property of the label that shows the Year value:

     

     

     Year(DatePicker1.SelectedDate) 

     

  • colbyturybury Profile Picture
    363 on at

    You have it backwards. I want to type the month/day/year in their own respective text boxes and that populate the date picker.

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @colbyturybury ,

     

    In that case set the DefaultDate property of the DatePicker to:

    DateValue($"{txtDay.Text}/{txtMonth.Text}/{txtYear.Text}")

     txtDay is the TextInput that has the Day value, etc.

  • colbyturybury Profile Picture
    363 on at

    The year works but the day and month do not. I put in today's date and the resulting date is 11/17/2023 even though I put 01 in month 11 in day and 2023 in the year.

  • Verified answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @colbyturybury ,

     

    That is because the DateValue function by default use the language from the current user's settings. You can override it to ensure that strings are interpreted properly. For example, "10/1/1920" is interpreted as October 1st in "en" and as January 10th in "fr".

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-datevalue-timevalue#description

     

    An easier way though is:

    Date(
     txtYear.Text,
     txtMonth.Text,
     txtDay.Text
    )

     

  • colbyturybury Profile Picture
    363 on at

    That worked! I could have sworn I had used this syntax but evidently not. Thankyou for the help!!! 

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @colbyturybury ,

     

    Glad to read your issue got addressed. Can you please click the "Accept as Solution" button on the post that has resolved your issue for the benefit of other members of the community?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard