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

Time Picker in Canvas App

Hi Experts,

 

I want to build an app with time in and time out fields. I am fine with the date picker but how to implement date and time picker on the same filed. 

 

Please suggest. Attached is the screen shot for reference.

 

Santhosh88_0-1653820977707.pngSanthosh88_1-1653821002232.png

 

 

Thanks

Santhosh

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @Santhosh88 

 

you can use a dropdown for hours, minutes and seconds:

dropdowns:

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

DefaultSelectedItems = [Text(Hour(Now()),"")]

 

ddMinutes Items = = ["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"]

DefaultSelectedItems = [Text(Minute(Now()),"")]

 

ddSeconds  Items = ["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"]

DefaultSelectedItems = [Text(Second(Now()),"")]

 

Result:

rubin_boer_0-1653824409268.png

Update or Patch is the datePicker & your hours, minute and seconds as per the comboboxes.

 

There you go.

 

Hope it helps,

R

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

View solution in original post

5 REPLIES 5
rubin_boer
Super User
Super User

hi @Santhosh88 

 

you can use a dropdown for hours, minutes and seconds:

dropdowns:

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

DefaultSelectedItems = [Text(Hour(Now()),"")]

 

ddMinutes Items = = ["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"]

DefaultSelectedItems = [Text(Minute(Now()),"")]

 

ddSeconds  Items = ["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"]

DefaultSelectedItems = [Text(Second(Now()),"")]

 

Result:

rubin_boer_0-1653824409268.png

Update or Patch is the datePicker & your hours, minute and seconds as per the comboboxes.

 

There you go.

 

Hope it helps,

R

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

Thanks for your reply. I did your suggestion, but the selected value is not getting stored in the share point list, though its datetime column.

 

Please suggest.

Santhosh88_0-1653825046841.png

Santhosh88_1-1653825078288.png

 




rubin_boer
Super User
Super User

hi @Santhosh88 just a question, did you select the date or use the default date. the calculation in the update is valid from selecting the date.

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

I clicked on calender icon and selected the date and hit on 'OK'.

 

Thanks

Hi @Santhosh88,

Have you solved your problem?

I am confused that if the column is Date and time(including time), why don't you generate the form based on the data source directly, which will get you a date time picker by default.

vqiaqimsft_0-1654051077705.png

vqiaqimsft_1-1654051351856.png

Try to generate it automatically, do not manually add it.

Best Regards,
Qi

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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