cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Date Picker: Only Select Today, Yesterday, And Tomorrow

Hi everyone,

 

I have a question about the Date Picker.

 

I add the "Date Picker" on a Canvas app, and I want to force it (the Date Picker) shows only today, yesterday, and tomorrow when a user try to select a date.

 

For example, today is January 14, 2020. When a user open this app and to click the Date Picker, he/she can only select January 13~15, but not others.

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@Anonymous 

This is not currently possible with a DatePicker control.  Instead, you can use a radio buttons input with this code in the Items property

[Today()-1,Today(),Today()+1]

 

Assuming the current date is January 14, the user will be able to choose from

  • Jan 13
  • Jan 14
  • Jan 15

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

1 REPLY 1
mdevaney
Super User III
Super User III

@Anonymous 

This is not currently possible with a DatePicker control.  Instead, you can use a radio buttons input with this code in the Items property

[Today()-1,Today(),Today()+1]

 

Assuming the current date is January 14, the user will be able to choose from

  • Jan 13
  • Jan 14
  • Jan 15

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (46,281)