web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Hamzeh,

    Please refer the below threads.

    https://community.dynamics.com/crm/f/117/t/168698

    https://community.dynamics.com/crm/f/117/t/188506

  • Suggested answer
    Community Member Profile Picture
    on at

    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
    Hamzeh Zawahreh Profile Picture
    3,674 on at

    hi Guido Preite,

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

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

    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.

  • Community Member Profile Picture
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans