cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Form "time entry"

Hi All,

I am currently having issues with creating an entry field that allows the user to select/input a time, I am using "Text(Now(), DateTimeFormat.ShortTime)" as the Defult Data and ""Text(DateTimeFormat.ShortTime)" as the format. However, this is not ideal as the user has to manually type in the time and this is inconvenient for the user and will create variances in the data entries between users. I was wondering if there was a way to make it more user friendly, for example have it as a selection like the date picker control.

 

Any help/advice would be much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @whitciv,

Could you please share a bit more about your scenario?

Do you want your users to select a time value rather than type manually within your app?

Based on the needs that you mentioned, I think the Dropdown controls could achieve your needs.

I have made a test on my side, please take a try with the following workaround:2.JPG

 

3.JPG

 

4.JPG

Set the OnVisible property of the screen which contains the Time entry input box to following:

Set(SelectedTime, Blank())

Set the Default property of the Text Input box (Time Input box) to following:

If(!IsBlank(SelectedTime), SelectedTime, Text(Now(), DateTimeFormat.ShortTime))

 

Set the Items property of the HourDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

Set the OnChange property of the HourDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Set the Items property of the MinuteDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

Set the OnChange property of the MinuteDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Please check the attached GIF screenshot for more details:

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Hi @whitciv,

Could you please share a bit more about your scenario?

Do you want your users to select a time value rather than type manually within your app?

Based on the needs that you mentioned, I think the Dropdown controls could achieve your needs.

I have made a test on my side, please take a try with the following workaround:2.JPG

 

3.JPG

 

4.JPG

Set the OnVisible property of the screen which contains the Time entry input box to following:

Set(SelectedTime, Blank())

Set the Default property of the Text Input box (Time Input box) to following:

If(!IsBlank(SelectedTime), SelectedTime, Text(Now(), DateTimeFormat.ShortTime))

 

Set the Items property of the HourDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

Set the OnChange property of the HourDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Set the Items property of the MinuteDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

Set the OnChange property of the MinuteDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Please check the attached GIF screenshot for more details:

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,841)