added flag for pick future date or not

This commit is contained in:
pramod mahajan 2025-09-09 13:31:30 +05:30
parent f8466e5f4a
commit d5b3c25b45
2 changed files with 4 additions and 1 deletions

View File

@ -96,8 +96,9 @@ const DocumentFilterPanel = ({ entityTypeId, onApply }) => {
placeholder="DD-MM-YYYY To DD-MM-YYYY" placeholder="DD-MM-YYYY To DD-MM-YYYY"
startField="startDate" startField="startDate"
endField="endDate" endField="endDate"
defaultRange={false} defaultRange={true}
resetSignal={resetKey} resetSignal={resetKey}
maxDate={new Date()}
/> />
</div> </div>

View File

@ -84,6 +84,7 @@ export const DateRangePicker1 = ({
allowText = false, allowText = false,
resetSignal, resetSignal,
defaultRange = true, defaultRange = true,
maxDate = null,
...rest ...rest
}) => { }) => {
const inputRef = useRef(null); const inputRef = useRef(null);
@ -117,6 +118,7 @@ export const DateRangePicker1 = ({
mode: "range", mode: "range",
dateFormat: "d-m-Y", dateFormat: "d-m-Y",
allowInput: allowText, allowInput: allowText,
maxDate ,
onChange: (selectedDates) => { onChange: (selectedDates) => {
if (selectedDates.length === 2) { if (selectedDates.length === 2) {
const [start, end] = selectedDates; const [start, end] = selectedDates;