Solved
How can I limit the dates that can be selected in Date Picker?
I need to limit the dates on the Date Picker to show 4/1/19 to 6/30/19, but am having trouble on locating where to edit this. I found a string of code (shown below) that can limit the dates, but am not sure where to place it within the code. Any help would be greatly appreciated!
var cal1 = new YAHOO.widget.Calendar("cal1","cal1Container",
{ pagedate: "1/5/2017",
mindate: "1/5/2017",
maxdate: "1/15/2017" }
);
Best answer by TomG
> @bchin said:
> @TomG - thanks for the recommendation! I have no experience with coding whatsoever and can't seem to figure out how to extract the code from jsdelivr. If you could assist - I'd appreciate it!
Add this to your Look & Feel Header in SOURCE mode (click the <> box):
```
<script src="https://cdn.jsdelivr.net/npm/flatpickr@4/dist/flatpickr.min.js"></script>
```
In your question JS, attached flatpickr to your text input field, for example:
```
jQuery("#"+this.questionId+" input[type=text]").flatpickr({minDate:"2019-01",maxDate:"today"});
```
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.