Skip Ribbon Commands
Skip to main content
ITLAQ Technologies

Skip Navigation LinksDiscussions List : Datepicker constrainInput
Use the Discussion list to hold forum-style conversations, including question and answer, on topics relevant to your team, project, or community.

Started: 4/19/2018 4:28 PM
Picture Placeholder: Greg Reno
Greg Reno
Datepicker constrainInput

​I am using a textbox as a date field. I do this to be able to allow the users to select a date or if the date is unknown use UNK.

e.g.

03/22/2017

03/UNK/2017

03/22/20UNK

In the past I would just add something like this to my global jQuery and set my field CSS to DATEFIELD.

$('.DATEFIELD').attr("placeholder", "mm/dd/yyyy").datepicker({ constrainInput: false

 });


I have set the CCS to Datepicker and I know I can get this to work but how can I apply constrainInput: false to the current jQuery?


ref: https://api.jqueryui.com/datepicker/#option-constrainInput


Thanks.

Picture Placeholder: Greg Reno
  • Greg Reno
/_layouts/15/images/person.gif" alt="Picture Placeholder: Greg Reno" />
Greg Reno

​I am using a textbox as a date field. I do this to be able to allow the users to select a date or if the date is unknown use UNK.

e.g.

03/22/2017

03/UNK/2017

03/22/20UNK

In the past I would just add something like this to my global jQuery and set my field CSS to DATEFIELD.

$('.DATEFIELD').attr("placeholder", "mm/dd/yyyy").datepicker({ constrainInput: false

 });


I have set the CCS to Datepicker and I know I can get this to work but how can I apply constrainInput: false to the current jQuery?


ref: https://api.jqueryui.com/datepicker/#option-constrainInput


Thanks.

14/19/2018 4:28 PM4/19/2018 4:28 PMNoCodes & Scripts
21.7911806524842
4/19/2018 10:12 AM
Posted: 4/19/2018 5:32 PM
Picture Placeholder: Greg Reno
Greg Reno

I believe I figured it out. Thank you Jim. Given your example with Form Level CSS, I created a Form Level Rule called jQuery. It is working.

I just need to figure out how to get it to work after adding rows in a repeating section.​

Picture Placeholder: Greg Reno
  • Greg Reno
/_layouts/15/images/person.gif" alt="Picture Placeholder: Greg Reno" />
Greg Reno

I believe I figured it out. Thank you Jim. Given your example with Form Level CSS, I created a Form Level Rule called jQuery. It is working.

I just need to figure out how to get it to work after adding rows in a repeating section.​

Greg Reno9404/19/2018 5:32 PM4/19/2018 5:32 PM
4/19/2018 10:12 AM