Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Datetimepicker onchange event not firing in adxstudio portal via custom javascript

Posted on by Microsoft Employee

Hi All, I am still struggling with datetime picker onchange event.
For me it is not at all firing. I am using the function in ADXstudio portal for crm 365 online. I tried most of the things to get this field change event work, but no luck. Please help.

Everywhere it was suggested to use below piece of code..but none worked for me. Please help.

$(".datepicker").on("dp.change", function(e) {
alert('hey');
});

$('#timepicker').datetimepicker({
format:'MMMM DD, YYYY',
maxDate:moment(),
defaultDate:moment()
}).on('dp.change',function(e){
console.log(e);
});


$('#timepicker').data('DateTimePicker').on('dp.change', function(e) { });
//This throws error as object doesnot support property or method 'on'


$("#timepicker").on("dp.change",function (e) {
lookup();
});

Please note this script i am writing in dynamics 365 crm, under portals custom javascript.

*This post is locked for comments

  • Suggested answer
    Hemant Kumar Sahu Profile Picture
    Hemant Kumar Sahu 1,825 on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    This worked for me.

    community.dynamics.com/.../750673

  • Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    Have a look my blog for the same :

    arpitmscrmhunt.blogspot.in/.../set-or-auto-populate-value-in-date.html

    Also can try below steps that I have mentioned in my blog comments :

    -- Right Click on Date Field Control Textbox and click on Inspect. Now copy the value of 'aria-describedby' attribute.

    -- Now use the below syntax to set value and perform onchange on date control :

    $('input[aria-describedby="<copied value of aria-describedby>"]').val("<your value>");

    For onchange Event try below syntax :

    $(document).ready(function(){

    var input = $("#datetimefieldid");

    $('input[aria-describedby="<copied value of aria-describedby>"]').change(function(){

    alert("Date has been changed.");

    });

    });

    Cheers

  • Suggested answer
    Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    I found the solution for this. pls check below link in my blog.

    mscrm365.blogspot.sg/.../trigger-datepicker-onchange-event-in.html

  • khendricks Profile Picture
    khendricks on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    Exactly! This is unacceptable. These new products they are releasing for Dynamics CRM are not market-ready. The new products are riddled with bugs and support is severely lacking. This might even be the first customer who leaves us in the history of our company. We are now implementing everything further with a proof-of-concept to avoid these kind of issues. That way we can cancel the project in time (if need be) and don't lose face with our customer.

  • Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    Khendrick me also facing the same issue. What i understood is MS support have doesnt have much knowledge on portals. My ticket are kept open more than two months. To be honest support guys asking how we created views in portal. Such basic knowledge also they dnt have. am really fucked up by MS support.

  • khendricks Profile Picture
    khendricks on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    I already found about 15 bugs in the portal. Some of them being breaking bugs. Our projects for a client had to be canceled and we are waiting for more than 6 weeks now for a resolution without any response from Microsoft

  • Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    I have already raised ticket with microsoft the same issue. Still no response

  • khendricks Profile Picture
    khendricks on at
    RE: Datetimepicker onchange event not firing in adxstudio portal via custom javascript

    I got the same issue, did you find a solution for this?

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans