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 :
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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans