Skip to main content
Nintex Community Menu Bar
Solved

Grey out control (date field) if date is less than TODAY

  • Apr 12, 2023 2:47 PM UTC
  • 6 replies
  • 386 views
  • Translate All

Forum|alt.badge.img+11

Hello!

Ok, where do I begin... So! I have been racking my brain for days now in trying to figure out how to grey out a field based on another field.

I have a “request date” field that auto populates when a form opens up. I need to grey out the “Due Date for law review” field if the date that is entered in is less than 14 days from the request date….

I cannot for the life of me find out how to do this and have not been successful in researching on google as everyone’s situation is different.

Your help and examples are greatly appreciated!

Thanks!

 

Best answer by Garrett

Hi @jpacheco 

 

The show time is enabled for both Date controls.

The Due Date restricts past dates

 

You can use the “DateDiff()” formula in the Form Rules.
dateDiff("TotalDays",[Form].[Request Date],[Form].[Due Date]).
This will return a number value which you can use for comparison.

 

PS: If you make DueDate field as read-only (< 14 days), users will not be able to update the DueDate field.

 

View original

6 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • Apr 12, 2023 3:06 PM UTC

Hi @jpacheco 

Just to confirm, you are using the New Responsive Form, right?

 

What do you mean by grey out? Make the field read-only or just make the control background fill color as grey

Translate

Forum|alt.badge.img+11
  • Author
  • Scout
  • Apr 12, 2023 3:36 PM UTC

@Garrett ,

Hi!!

Yes, grey out = Read-Only and I am using the “Nintex Forms for Office 365” (looks to be responsive, see below).

I want to make the Due Date field read-only.

So if in the Due Date field someone selects a date that is “- 14 days” (less than) from the Request Date, they cannot enter anything in… Thnx for your quick response!

 

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Answer
  • Apr 12, 2023 3:40 PM UTC

Hi @jpacheco 

 

The show time is enabled for both Date controls.

The Due Date restricts past dates

 

You can use the “DateDiff()” formula in the Form Rules.
dateDiff("TotalDays",[Form].[Request Date],[Form].[Due Date]).
This will return a number value which you can use for comparison.

 

PS: If you make DueDate field as read-only (< 14 days), users will not be able to update the DueDate field.

 

Translate

Forum|alt.badge.img+11
  • Author
  • Scout
  • Apr 12, 2023 7:39 PM UTC

@Garrett ,

Hey thanks so much for you promptness and help!! I’m going to try this out and will update this as soon as I test!

 

Thanks again!

Translate

Forum|alt.badge.img+11
  • Author
  • Scout
  • Apr 13, 2023 2:27 PM UTC

@Garrett, YOU ROCK!!! This really helped me and I’m extremely grateful for your help in this! Thank you!!

Translate

Garrett
Forum|alt.badge.img+16
  • Scout
  • Apr 13, 2023 3:39 PM UTC

Hi @jpacheco 

You’re welcome. Just glad that I was able to help you. 

Translate