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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Show/hide date field

(1) ShareShare
ReportReport
Posted on by

Hi All,

I have a need to show/hide fields on a web page in Dynamics 365 portals.

I have added custom JavaScript to the Web Page that successfully hides all fields as desired.  However, the date picker control remains visible.  When the code runs to show the fields, the date fields shows the date picker control and a text field.  Examples below:

Fields Hidden

FieldsHidden.jpg

Fields Show

FieldsShown.jpg

Is there a trick to hiding the date field?

Thank you!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    LeoAlt Profile Picture
    16,331 Moderator on at
    RE: Show/hide date field

    Hi Tom,

    A datepicker control includes many elements.

    So if you want to hide a datepicker, you need to 

    • Destroy the datepicker functionality from the input text field.
    • Hide the input text field.

    Here is the demo:

    http://jsfiddle.net/ezKwN/

    Hope it helps.

    Best Regards

    Leo

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Show/hide date field

    Hi,

    Try parent .hide:

    $('#lac_datefield').parent().hide();

    Hope this helps.

  • Suggested answer
    Dmytro Rutkovskyi Profile Picture
    1,835 on at
    RE: Show/hide date field

    I advice using next code snipping for hiding fields

    $("#new_datefield").closest("td").hide();



  • Tom Thompson Profile Picture
    on at
    RE: Show/hide date field

    This is on the Portal Web Page, so it is my understanding that Business Rules do not apply.

    Code is..

    $('#lac_datefield').hide();

    $('#lac_datefield_label').hide();

  • gdas Profile Picture
    50,091 Moderator on at
    RE: Show/hide date field

    Can you please share your code. Did you tried with busines rules?

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans