cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rajmilansinh
Advocate V
Advocate V

How to set Date manually in PowerApps Portal DateTimePicker using Jquery?

How to set Date manually in PowerApps Portal DateTimePicker using Jquery

Example:
Date value is "12/01/2020" (MM/dd/yyyy)
I want to set it in DateTimePicker which includes time format too.
But we can pass time as 00 as it is not required to store for my requirement.
Can you please suggest a way how to work with DateTimePicker using Jquery?

Jquery DateTimePicker (PowerApps Portal)

1 ACCEPTED SOLUTION

Accepted Solutions
chauhanhardik
Frequent Visitor

Hi @rajmilansinh

 

Try below code:

var dateValue = new Date(12/25/2020).toString("yyyy-MM-dd") + "T00:00:00.0000000";

$("fieldName").val(dateValue);

 

Thanks,

Hardik

View solution in original post

2 REPLIES 2
chauhanhardik
Frequent Visitor

Hi @rajmilansinh

 

Try below code:

var dateValue = new Date(12/25/2020).toString("yyyy-MM-dd") + "T00:00:00.0000000";

$("fieldName").val(dateValue);

 

Thanks,

Hardik

rajmilansinh
Advocate V
Advocate V

@chauhanhardik  Thanks Hardik it worked fine!

Helpful resources

Announcements
Carousel News & Announcements 768460.png

What's New in the Community?

Check out the latest News & Events in the community!

Carousel Community Blog 768x460.png

Check out the Community Blog

Read all about the most recent blogs in the community!

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Need Assistance in the Community.PNG

Community Support

Learn more about how to interact in the community and more.

Users online (2,084)