Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Using JavaScript to determine if time selected from DateTime field

Posted on by 210

Hello. I have the below DateTime field (new_starttime) in CRM 4.0. How can one check if a time has been selected from the dropdown using JavaScript? Currently, code written in the onChange event  of the new_starttime field executes when a date or a time is selected. I want to be able to use JavaScript to determine whether the time dropdown was selected by the user. Would also want to use JavaScript to determine if the date was selected.

DateTime-field.png 

*This post is locked for comments

  • synthesis Profile Picture
    synthesis 210 on at
    RE: Using JavaScript to determine if time selected from DateTime field

    How do you find out the selected DHTML element?

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Using JavaScript to determine if time selected from DateTime field

    I don't think there's a supported way to do this, though you should be able to determine the DHTML element for the time dropdown, and attach an event to that

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans