Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Jquery

(0) ShareShare
ReportReport
Posted on by 3,674

dears ,

i want to ask if the dynamic crm support jquery functionality.

i have the following example:

i have a text field called new_date i want by using jquery to apply a jquery function to be a date picker by using the jquery file jquery-1.12.4.js.


i create a java script file and put the following script:

 $(document).ready(function () {

    smsm= function () {

    //var now = new Date();
  //   Xrm.Page.getAttribute("new_date").setValue("txt2");
       $("#new_date_i").datepicker();

           }

    
});

 

i have the jqury file import within the form but i have the error :  that object does not support property or method .datepicker

 

and i put them between <script> </script>  have the error the function smsm is undefined at eval code

*This post is locked for comments

  • RE: Jquery

    Hi,

    You can try creating a html web resource with the custom date control. Add that web resource to your form.

    For passing the date value to a plugin(in case you are using that):

    On form save, write a script to copy the custom date control's value to a hidden CRM form field and check if you receive that in the plugin.

    Regards

  • Suggested answer
    Hamzeh Zawahreh Profile Picture
    Hamzeh Zawahreh 3,674 on at
    RE: Jquery

    hi Tripti R. , i know there is a field of type date. i need to format the date field to Hijri date format, in crm there is no supported way, so i try to use the jquery to format a text field as a date.

  • Suggested answer
    Hamzeh Zawahreh Profile Picture
    Hamzeh Zawahreh 3,674 on at
    RE: Jquery

    hi Guido Preite,

    so i can't include it in my form as a JS web resource and manipulate the DOM

  • Suggested answer
    RE: Jquery

    Hi Hamzeh,

    If you  want CRM form field to be displayed like a date, select its data type as Date and Time.

    Can you elaborate more - Why do you want to set it using jQuery?

    Regards.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,076 on at

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,403 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans