cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AshishJaiswal
Post Patron
Post Patron

Datepicker Blank or Selected

Hi All,

 

This would be a easy one

 

How to check if date picker has a date selected in it or not

 

Because displaymode of my toggle depends on it.

 

If date selected then toggle in edit mode

 

If date not selected then toggle in disabled mode

 

Please help

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@AshishJaiswal 

Set your displaymode property to the following formula:

  If(IsBlank(yourDatePicker.SelectedDate), Disabled, Edit)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@AshishJaiswal 

Set your displaymode property to the following formula:

  If(IsBlank(yourDatePicker.SelectedDate), Disabled, Edit)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

AshishJaiswal
Post Patron
Post Patron

@RandyHayes 

Hello Again ! I'm already due to give you one week of beer supply.

Actually here is the case

If Toggle1 is selected (yes/no) then datepicker1 will be in edit.mode

If datepicker1 is in editmode ( something selected in it) then toggle2 will do in edit mode

Now the thing is
i would like to reset the datepicker1 if toggle1.value is set no (or changed from yes to no)

 

RandyHayes
Super User
Super User

@AshishJaiswal 

I'll gladly accept more beer supply 😁

 

So, your Toggle1 OnUncheck action should be : Reset(yourDatePicker)

Your DatePicker DisplayMode should be : If(Toggle1.Value, Edit, Disabled)

Your Toggle2 DisplayMode will be as previously mentioned: If(IsBlank(yourDatePicker.SelectedDate), Disabled, Edit)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
AshishJaiswal
Post Patron
Post Patron

@RandyHayes

 

haha... you bet.

 

I found the fix.

if(toggle1.vale = false, reset(datepicker1) ) amd it is working fine.

RandyHayes
Super User
Super User

@AshishJaiswal 

Very good!  Sounds like you're underway now.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes

 

I am learning from you all... member of the community. Big thank you to all 

 

and to you Randy... always ready to help (I gave you a shout out on Twitter) 

RandyHayes
Super User
Super User

@AshishJaiswal 

Awesome!!  Keep on learning!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,630)