Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

JQuery in Dynamics 365 portals to save value on a DateTimePicker

Posted on by 20

hi

I am trying to save a value on the date on a crm portal below is the code im using

$(document).ready(function(){

var roundTripFormat = "YYYY-MM-DDTHH:mm:ss.0000000\\Z";

var input = $("#AppointmentStartDate");

var date = moment("06/28/2017").utc();

input.val(date.format(roundTripFormat));

input.siblings(".datetimepicker").data("datetimepicker").setValue(date);

});

This code stopped working for what reason i dont know please help

*This post is locked for comments

  • Gorimani Profile Picture
    Gorimani 20 on at
    RE: JQuery in Dynamics 365 portals to save value on a DateTimePicker

    Hi i got the error while i was debugging the code. I got the error below

    Object doesn't support property or method 'setValue'

  • M.T. Eikelenboom Profile Picture
    M.T. Eikelenboom 5,241 on at
    RE: JQuery in Dynamics 365 portals to save value on a DateTimePicker

    Have you tried debugging it in your browsers? Setting breakpoints? Or did you see any errors in the console of the browser?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans