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"
startField="startDate"
endField="endDate"
defaultRange={false}
defaultRange={true}
resetSignal={resetKey}
maxDate={new Date()}
/>
</div>

View File

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