web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

How to enable and disable Date field in CRM form using JS?

(0) ShareShare
ReportReport
Posted on by

I disabled date field using .setDisabled() as true. But when i disable it using .setDisabled(false), the date picker and input field is greyed out. I tried business rule also. Getting same behaviour. 

Is this a bug? Any alternative solution available?

I have the same question (0)
  • Pradeep Rai Profile Picture
    5,489 Moderator on at

    Hi,

    Can you please share the screenshot of business rule/script. because I tried the same with business rule and it working fine:

    pastedimage1633516179037v1.png

    and with script as well:

    inside script used below code to enable and disabled the datetime field:

    formContext.getControl("fieldlogicalname").setDisabled(true);//disabled

    formContext.getControl("fieldlogicalname").setDisabled(false);//enable

    Thanks,
    Pradeep.

  • Community Member Profile Picture
    on at

    I'm working in UCI CRM on premise.

    Business Rule:

    pastedimage1633519189428v1.png

    Form behavior: Disable 'Rent Escalation end Date' if 'Does Escalation Rate Vary?' = No. Working fine

    pastedimage1633519309177v2.png

    Form behavior: Enable 'Rent Escalation end Date' if 'Does Escalation Rate Vary?' = Yes. Rent Escalation End date is unlocked/enabled, but date picker not working.

    pastedimage1633519479883v3.png

    Thanks in advance,

    Harisa

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 101 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 72

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans