cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Setting the default range values of datetimepicker does not work

AK_9796023
5-Regular Member

Setting the default range values of datetimepicker does not work

Hi,

I am trying to initialize a DateRange datetimepicker with default start and end date and get following message in the console. Furthermore, the "done"-button triggers no event

 

See attached screenshot.

I am using ThingWorx 9.1.0 

Thanks in advance

AK_9796023_0-1621331606511.png

AK_9796023_2-1621333705326.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:AK_9796023)

Hi @AK_9796023.

 

As you know, a case was created for this issue.  The fix has now been delivered in ThingWorx 9.1.7.

 

Please test it out and let us know if you still have issues.  Otherwise, please mark this response as the Accepted Solution for the benefit of others experiencing the same issue.

 

Regards.

 

--Sharon

View solution in original post

13 REPLIES 13
PaiChung
22-Sapphire I
(To:AK_9796023)

Which widget is this?

AK_9796023
5-Regular Member
(To:PaiChung)

This is the Date Time Picker Widget(Type:ptcsdatepicker)

PaiChung
22-Sapphire I
(To:AK_9796023)

You should be able to generate date time and bind that to the Widget Start and End.

AK_9796023
5-Regular Member
(To:PaiChung)

I have generated start and end datetimes and binded to "StartDate  and "EndDate" widget properties but get this error message

AK_9796023_0-1621584548253.png

 

PaiChung
22-Sapphire I
(To:AK_9796023)

can you map them to a ValueDisplay as well, or just check in the dev tools what the values are that you are bringing back. Since it seems to call out 'null' perhaps what you are generating is not working or perhaps not the format it should be.

AK_9796023
5-Regular Member
(To:PaiChung)

Hi @PaiChung,

here are the values:

 

AK_9796023_0-1621928885548.png

 

slangley
23-Emerald II
(To:AK_9796023)

Hi @AK_9796023.

 

Where are you setting the datetime value?  Since you're getting an error "Cannot read property 'date' of undefined" it sounds like you're not feeding in a datetime base type. If that appears to be ok, you need to check that the service is able to run successfully.

 

If you can provide your mashup, service, etc., we can review in more detail.

 

Regards.

 

--Sharon

AK_9796023
5-Regular Member
(To:slangley)

Hi @slangley,

 

in the example mashup is above the problem with the default range initialization where i set the datetimepicker with the start and end date expression values.
Below you will find the problem with the datetimepicker changed event. When I click "Done" a service should be called, here in the example i have an expression, which unfortunately does not work. It triggers only when click the "clear"-icon

slangley
23-Emerald II
(To:AK_9796023)

Hi @AK_9796023

 

From the mashup you provided, it is apparent there is some sort of issue.  To move forward, I would like to open a case so that  member of our Support Services team can spend more time to investigate, and if needed, open a ticket with our R&D team.

 

If you are in agreement, I will be happy to open the case on your behalf.

 

Regards.

 

--Sharon

AK_9796023
5-Regular Member
(To:slangley)

Hi @slangley,

Yes, please help to open a case for the request.

Thank you

slangley
23-Emerald II
(To:AK_9796023)

Hi @AK_9796023.

 

As you know, a case was created for this issue.  The fix has now been delivered in ThingWorx 9.1.7.

 

Please test it out and let us know if you still have issues.  Otherwise, please mark this response as the Accepted Solution for the benefit of others experiencing the same issue.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @AK_9796023.

 

As you know, a case was created for this issue.  The fix has now been delivered in ThingWorx 9.1.7.

 

Please test it out and let us know if you still have issues.  Otherwise, please mark this response as the Accepted Solution for the benefit of others experiencing the same issue.

 

Regards.

 

--Sharon

mgoel
17-Peridot
(To:AK_9796023)

@AK_9796023 

 

If you think last solution suggested on this thread was help then please mark it as accept solution for the benefir of other community members.

 

Regards,

Mohit

Top Tags