Skip to main content

Notifications

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

  • Community Member Profile Picture
    on at
    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
    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
    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
    Community Member Profile Picture
    on at
    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
    17,078 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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans