Skip to content

Replies

0
Rohit Rawat
Rohit Rawat answered on Mar 6, 2026 3:57 AM

Hello arkan,

Thank for the help its working fine. I have one doubt when i declare min max like below:

{
columnKey: “action_date”,
editorType: “datepicker”,
required: true,
editorOptions: {
dateInputFormat: “yyyy-MM-dd”,
valueFormat: “date”, // Keeps value as Date object
datepickerOptions: {
changeMonth: true,
changeYear: true,
minDate: “-3M”, // 3 months before today
maxDate: 0 // today
},

then its working fine and not giving validation for out of range dates and its also disabling the out of range dates. But, when i do the below

minDate: new Date(),
maxDate: (function () {
let d = new Date();
d.setFullYear(d.getFullYear() + 1);
return d;
})()

then again its giving validation error when editing a row with out of range date. I need to understand this behaviour is possible.

Thank you for your help.
Regards
Rohit Rawat

<p data-start=”539″ data-end=”769″></p>

0
Rohit Rawat
Rohit Rawat answered on Mar 5, 2026 3:41 AM

Hello Arkan,

Thanks for the reply. I have checked it everything is fine but one issue. Can we  disabled the dates outside range? like if user has selected 3 march 2026 and he tries to edit it on 6 march 2026. The calendar range should be current  and current + 3 months (range can be different) rest disabled. But when he tries to edit calender should still show 3 march without out of range validation even tho its fine that he cannot selet that date again once changed by opening calender.

If its possible do let me know. Looking forward to your response.

Thanks and regards

Rohit Rawat

0
Rohit Rawat
Rohit Rawat answered on Mar 5, 2026 3:40 AM

Hello monica,

Thanks for the reply. I have checked it everything is fine but one issue. Can we  disabled the dates outside range? like if user has selected 3 march 2026 and he tries to edit it on 6 march 2026. The calendar rrange should be current  and current + 3 months rest disabled. But when he tries to edit calender should still show 3 march without out of range validation even tho its fine that he cannot selet that date again once change by opening calendaer.

If its possible do let me know. Looking forward to your response.

 

Thanks and regard

Rohit Rawat

0
Rohit Rawat
Rohit Rawat answered on Mar 2, 2026 10:24 AM

Hello Monica,

Thank you for your response.

 

I have two date columns: action_date and action_due_date. If a row contains a date that is outside the currently allowed range and the user attempts to edit that row, the original (out-of-range) date should still be displayed. Additionally, the user should be able to save the row as long as they have not selected a new date outside the current valid range.

I am using a different syntax to bind the igGrid. Below is a sample column configuration for your reference:

{
columnKey: “action_date”,
editorType: “datepicker”,
required: true,
editorOptions: {
dateInputFormat: “yyyy-MM-dd”,
valueFormat: “date”,
datepickerOptions: {
changeMonth: true,
changeYear: true
},
validatorOptions: {
required: true,
notificationOptions: {
mode: “popover”
},
errorMessage: resource_d3_process.ActionDateReq
}
}
}

Could you please guide me on how to apply custom validation in this case?

Also, if I apply custom validation, will it interfere with the existing required validation? Specifically, I want to ensure that the original out-of-range date is not reset automatically and that validation only applies when the user selects a new date.

Is there any way i could turn off the max min range validation? As the date selected will always be in range during adding time and if user edit after 3 date still that day would be visible and user can change the date to new if he wants wihtin current new range?

Looking forward to your response.

Thanks and regards,
Rohit Rawat

1
Rohit Rawat
Rohit Rawat answered on Mar 2, 2026 10:04 AM

<p class=”isSelectedEnd”>Hello Monica,</p>
<p class=”isSelectedEnd”>Thank you for your response.</p>
<p class=”isSelectedEnd”>I have two date columns: action_date and action_due_date. If a row contains a date that is outside the currently allowed range and the user attempts to edit that row, the original (out-of-range) date should still be displayed. Additionally, the user should be able to save the row as long as they have not selected a new date outside the current valid range.</p>
<p class=”isSelectedEnd”>I am using a different syntax to bind the igGrid. Below is a sample column configuration for your reference:</p>
<p class=”isSelectedEnd”>{
columnKey: “action_date”,
editorType: “datepicker”,
required: true,
editorOptions: {
dateInputFormat: “yyyy-MM-dd”,
valueFormat: “date”,
datepickerOptions: {
changeMonth: true,
changeYear: true
},
validatorOptions: {
required: true,
notificationOptions: {
mode: “popover”
},
errorMessage: resource_d3_process.ActionDateReq
}
}
}</p>
<p class=”isSelectedEnd”>Could you please guide me on how to apply custom validation in this case?</p>
<p class=”isSelectedEnd”>Also, if I apply custom validation, will it interfere with the existing normal validation? Specifically, I want to ensure that the original out-of-range date is not reset automatically and that validation only applies when the user selects a new date. Even tho he wont be able to select a date out of range , it only happens during editing as user edits a record which was saved 2-3 days ago.</p>
<p class=”isSelectedEnd”>Looking forward to your response.</p>
Thanks and regards,
Rohit Rawat

0
Rohit Rawat
Rohit Rawat answered on Feb 26, 2026 3:36 PM

Hello Team,

I am facing an issue with the datepicker control.

Suppose a record is saved with the current date, and the datepicker’s minimum and maximum range is set from the current date up to the next three months.

Now, if the user edits that same record after two days, the datepicker resets the value to the new current date and shows a validation message stating that the previously saved date is out of range.

However, my requirement is that when editing the record, the previously saved date should still be displayed in the calendar without triggering the “out of range” validation error. The min and max range can remain the same, and it is acceptable if the user is not allowed to reselect that older date again. But it should be visible when the record is opened in edit mode for the first time.

Example:
If a record was saved on 24 Feb 2026, and today is 26 Feb 2026, when editing the record, the datepicker should still display 24 Feb 2026 even though the current allowed range is from 26 Feb 2026 to the next three months.

Could you please help me with this? It is quite important.

Thank you.

0
Rohit Rawat
Rohit Rawat answered on Nov 7, 2023 2:44 PM

Hello  georgi,

Thanks you so much for your response. It was really helpful. Just i need alil more help

I m really confused with the following

1) $("#grid").igGridUpdating("editorForKey", "id");

2) $("#grid").igGridUpdating("editorForKey", "id").data(igvalidator)

3)$("#grid").igGridUpdating("editorForKey", "id").data(igvalidator). element.

Does the first one provide the column value? And why we cant use first one to target the column in which we have to change the required property and what does the second one give?.