marvman
Nintex Newbie

How do i change the css style of a date field in Nintex Forms?

Jump to solution

i want to add a border around the date field in Nintex forms as it is possible for title fields.

Title fields and all other controls have a css class "ms-rtestate-field" which will set this border correct, but the date fields have no specific class or id i can use. Also if add an css class in the control setting in Nintex Forms, the class isn't available in the code.

Does anyone has an idea how i can add a border to the date field?

0 Kudos
Reply
6 Replies
emha
Automation Master
Automation Master

Re: How do i change the css style of a date field in Nintex Forms?

Jump to solution

you can simply configure it in control's settings

0 Kudos
Reply
marvman
Nintex Newbie

Re: How do i change the css style of a date field in Nintex Forms?

Jump to solution

Hi ,

i know that i can configure the border in the control settings, but this is not the border i want. If i configure it in the control settings, the border looks like this:

But i want the border to look like this:

 (the red border is painted)

Within other controls in Nintex Forms, i can add a css class on "Control CSS class", but for date controls it has no affect on the code. If you add a css class to the control, publish the form and check the code within DOM Explorer, the class is not available in the code.

0 Kudos
Reply
emha
Automation Master
Automation Master

Re: How do i change the css style of a date field in Nintex Forms?

Jump to solution

then try following

- configure a custom 'CSS class' for datepicker control (eg. xCSSClass)

- add a style definition like following to form's 'Custom CSS'

.xCSSClass .nf-date-picker{
   border: 2px solid blue !important;
}
‍‍‍

View solution in original post

Reply
marvman
Nintex Newbie

Re: How do i change the css style of a date field in Nintex Forms?

Jump to solution

i already did this with no success.

The CSS class "xCSSClass" is not written in the code and also the modification on "nf-date-picker" has no effect.

Fyi:

I am using a site workflow with an start form (nintex forms for nintex workflow).

0 Kudos
Reply
MegaJerk
Automation Master
Automation Master

Re: How do i change the css style of a date field in Nintex Forms?

Jump to solution

Marian's rule should totally work, even if it's a site workflow starting form, as long as it's a Nintex Form, it shouldn't be different. 

Make sure that you have the class set up correctly like (make sure that there is not a period (.) in front of the class name when it's typed into the CSS class input!)

and that your CSS is in the right place: 

Saving those settings should produce instant results in your Form Developer Environment:


Reply
marvman
Nintex Newbie

Re: How do i change the css style of a date field in Nintex Forms?

Jump to solution

Hi ‌,

thanks, now it works! I wrote the custom css class in "Control CSS Class" and not "CSS Class", misunderstood marians description. I will mark Marians answer as correct, because she first replied the correct answer. 

Thanks a lot!

Reply