Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker Value issue #2213

Closed
hemanth307 opened this issue Jun 4, 2024 · 1 comment
Closed

DatePicker Value issue #2213

hemanth307 opened this issue Jun 4, 2024 · 1 comment
Labels
component: DatePicker wontfix This will not be worked on in the short/medium term

Comments

@hemanth307
Copy link

hemanth307 commented Jun 4, 2024

**<LocalizationProvider dateAdapter={LuxonUtils} locale={locale}>
            <DatePicker
              OpenPickerButtonProps={{
                'id': 'FilterValue',
              }}
              inputFormat={format}
              showToolbar={false}
              value={rowData.value}
              onChange={(e: any) => {
                onColumnValueChange(e, rowData.id, "value");
              }}
              onError={(reason: any, value: any) => {
                if (value === null || value === "") {
                  setFilterDateHelpText("Required");
                }
                else if (reason !== null && reason !== "") {
                  switch (reason) {
                    case "invalidDate":
                      setFilterDateHelpText("Required");
                      break;
                  }
                }
                else {
                  setFilterDateHelpText("");
                }
              }}
              renderInput={props =>
                <TextField
                  {...props}
                  id="AdvancedFilterValue"
                  aria-label="Required"
                  inputProps={{ ...props.inputProps, 'aria-label': "Required", "placeholder": format }}
                  error={
                    props.error || rowData.value === null || rowData.value === ""
                  }
                  helperText={filterDateHelpText !== "" ? filterDateHelpText : props.helperText}
                />
              }
            />
          </LocalizationProvider>**
          
  1. I have a row with different columns and this datepicker component gets rendered on selection of values in any column, so initially it is showing "Required" and if i select a value in the datepicker the "required" is vanishing and then if i change any other column the required option in the datepicker is appearing but the datepicker still has a date in the textfield. so when i debug by changing anyother column the datepicker is getting triggered and the OnError is also getting triggerd and the value is null and the "required" option is appearing, but the value in the textfield is still there.

  2. Also if i clear the date field the "required" is appearing and if i select date again the "required" is not vanishing, it's still there.

@hemanth307 hemanth307 added the status: needs triage These issues haven't been looked at yet by a maintainer. label Jun 4, 2024
@LukasTy
Copy link
Member

LukasTy commented Jun 4, 2024

Hello @hemanth307. This package has long been out of maintenance.
Please find the important information here.
We highly encourage you to start using @mui/x-date-pickers.
You can start here, then migrate to @mui/x-date-pickers@v5 using this guide and consider spending time to bump your usage to at least v6 (current LTS) with this guide.

@LukasTy LukasTy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
@LukasTy LukasTy added wontfix This will not be worked on in the short/medium term component: DatePicker and removed status: needs triage These issues haven't been looked at yet by a maintainer. labels Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DatePicker wontfix This will not be worked on in the short/medium term
Projects
None yet
Development

No branches or pull requests

2 participants