Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Update using javascript for coral touch ui date picker to show date based on classic ui data

Avatar

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

19 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

19 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
srinivas_chann1
Level 4

25-07-2019

Hi,

I have to  show the retrieved date data  from crxde which was saved using classic ui dialog  using javascript to  granite/ui/components/coral/foundation/form/datepicker

The data when i retrieved  in javascript comes up as

"Thu Jul 25 2019 12:48:00 GMT+0530"

Now i need to pass this data to coral datepicker  using javascript .

Any inputs or sample code as how i could achieve it

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

19 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
Level 4
srinivas_chann1
Level 4

Likes

19 likes

Total Posts

222 posts

Correct Reply

6 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
srinivas_chann1
Level 4

28-07-2019

I was trying to read the pageproperties using ajax query to pagepath/jcr:content.json  this was sending request in the above format.

I changed the ajax query to point to servelt and send it back to ajax request and solved the issue

Component dialog details of the field

<Date

         jcr:primaryType="nt:unstructured"

         granite:class=".cq-dialog-field-filldata-parentnode-data"

        

         sling:resourceType="granite/ui/components/coral/foundation/form/datepicker"

         granite:id="datecompId"

         displayedFormat="MMMM DD, YYYY hh:mm a"

         displayTimezoneMessage="{Boolean}true"

         type="datetime"

         fieldLabel="Date"

         name="../../releaseDate">

        </Date>

Step2:-

I created a ajax request based on

Send a Ajax request to servlet

var requestPathWithHtml = $(".foundation-content-path").data("foundationContentPath");

        var requestPath=requestPathWithHtml.replace(/\.[^/.]+$/, "");

  $.ajax({

            type: "GET",

            url: "/bin/requreidserveltpath",

  data:{"pagepath":requestPath},

  contentType: "application/json"

        }).success(function (res) {

$("#datecompId").val(res["pressReleaseDate"]);

}

Answers (0)