Hi there,
I'm building something where i need to link some input data to a date. I've been playing around with the Datepicker. The Datepicker defaults to todays date.
However, what i would like is for it to display the date of a specific weekdat, eg. Monday.
Is there away to make the datepicker display a specific weekday, so lets say I had one that displayed todays date, and then one that displayed only the date of for example Monday 🙂
Cheers.
- Toby
Solved! Go to Solution.
Hi @Anonymous ,
Do you want to display a Weekday number (e.g. Monday) within the DatePicker control rather than a actual date value (e.g. 09/20/2019)?
If you want to display a Weekday number (e.g. Monday) within the DatePicker control rather than a actual date value (e.g. 09/20/2019), I afraid that there is no way to achieve your needs in PowerApps currently.
If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
As an alternative solution, please take a try with the following workaround:
Please consider add a Label within your app, set the Text property to following:
If( Weekday(DatePicker1.SelectedDate) = 1, "Sunday", Weekday(DatePicker1.SelectedDate) = 2, "Monday", Weekday(DatePicker1.SelectedDate) = 3, "Tuesday", Weekday(DatePicker1.SelectedDate) = 4, "Wednesday", Weekday(DatePicker1.SelectedDate) = 5, "Thursday", Weekday(DatePicker1.SelectedDate) = 6, "Friday", Weekday(DatePicker1.SelectedDate) = 7, "Saturday" )
then put the Label control over the DatePicker box (make the Label control override the DatePicker box), set the Fill property of this Label to following:
RGBA(141, 198, 63, 1)
set the Color property of this Label to following:
RGBA(255, 255, 255, 1)
then click "Home"-> "Reorder"-> "Bring to front" option to make the Label display in front of the DatePicker box.
Please check the following GIF screenshot for more details:
In addition, you could also consider create a custom interactive Calendar view within your app to achieve your needs:
Best regards,
Hey @Anonymous
I published this custom re-usable date picker control that allows you to restrict selection of date ranges too. Check this out here: https://powerusers.microsoft.com/t5/Components-Samples/Custom-Calendar-to-Restrict-range-to-Date-Selection/td-p/366999
Feel free to download and use it.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hey @Anonymous
Hi @yashag2255
Thanks very much for the answer, a shame that is not yet doable, but I will definately raise that as an idea as I think this would be a valuable thing to add, as right now it seems rather hard to link up input data to a specific date, or even make a condition based on a specific date 🙂
- But thanks very much for the answer 🙂
Hey @Anonymous
You can walk an extra mile and try exploring to create a custom component for that. Let me try that and if successful, I will post it in the components gallery and let you know.
If your issue is resolved, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
@yashag2255 that sounds fantastic, and would of course be very helpful.
I too will look into ways of possible making a custom solution to this
- Toby
Hi @Anonymous ,
Do you want to display a Weekday number (e.g. Monday) within the DatePicker control rather than a actual date value (e.g. 09/20/2019)?
If you want to display a Weekday number (e.g. Monday) within the DatePicker control rather than a actual date value (e.g. 09/20/2019), I afraid that there is no way to achieve your needs in PowerApps currently.
If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
As an alternative solution, please take a try with the following workaround:
Please consider add a Label within your app, set the Text property to following:
If( Weekday(DatePicker1.SelectedDate) = 1, "Sunday", Weekday(DatePicker1.SelectedDate) = 2, "Monday", Weekday(DatePicker1.SelectedDate) = 3, "Tuesday", Weekday(DatePicker1.SelectedDate) = 4, "Wednesday", Weekday(DatePicker1.SelectedDate) = 5, "Thursday", Weekday(DatePicker1.SelectedDate) = 6, "Friday", Weekday(DatePicker1.SelectedDate) = 7, "Saturday" )
then put the Label control over the DatePicker box (make the Label control override the DatePicker box), set the Fill property of this Label to following:
RGBA(141, 198, 63, 1)
set the Color property of this Label to following:
RGBA(255, 255, 255, 1)
then click "Home"-> "Reorder"-> "Bring to front" option to make the Label display in front of the DatePicker box.
Please check the following GIF screenshot for more details:
In addition, you could also consider create a custom interactive Calendar view within your app to achieve your needs:
Best regards,
Hey @Anonymous
I published this custom re-usable date picker control that allows you to restrict selection of date ranges too. Check this out here: https://powerusers.microsoft.com/t5/Components-Samples/Custom-Calendar-to-Restrict-range-to-Date-Selection/td-p/366999
Feel free to download and use it.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
User | Count |
---|---|
204 | |
93 | |
84 | |
47 | |
42 |
User | Count |
---|---|
251 | |
104 | |
104 | |
62 | |
57 |