Skip to content

Commit 7e47999

Browse files
authored
Set max date in settings and remove from question_text code (#10400)
1 parent 498d66b commit 7e47999

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/survey-core/src/question_text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ export class QuestionTextModel extends QuestionTextBase {
554554
};
555555
const setMax = (val: any) => {
556556
if (!val && this.isDateInputType) {
557-
val = !!settings.maxDate ? settings.maxDate : "2999-12-31";
557+
val = settings.maxDate;
558558
}
559559
setProp("renderedMax", val);
560560
};

packages/survey-core/src/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ export var settings = {
642642
/**
643643
* Specifies a maximum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
644644
*/
645-
maxDate: "",
645+
maxDate: "2999-12-31",
646646
/**
647647
* A method that displays a modal dialog.
648648
*

0 commit comments

Comments
 (0)