react-multi-date-picker icon indicating copy to clipboard operation
react-multi-date-picker copied to clipboard

placeholder prop not working

Open jees47 opened this issue 3 years ago • 4 comments

placeholder prop not working even though its there

const [ingestDate, setIngestDate] = useState(null);

              <DatePicker
                  placeholder="From - To"
                  value={ingestDate}
                  onChange={(date) => {
                    setIngestDate(date);
                    console.log("ingest stat date", date[0].format());
                    console.log("ingest end date", date[1].format());
                  }}
                  maxDate={new DateObject()}
                  numberOfMonths={2}
                  range
                  format="MM/DD/YYYY HH:mm:ss A"
                  plugins={[<TimePicker position="bottom" />]}
                  render={<InputIcon className="form-control ml-2 " />}
                />

jees47 avatar Jan 28 '22 11:01 jees47

Hi It's because you are rendering custom input. You need to set placeholder directly to it.

shahabyazdi avatar Jan 28 '22 11:01 shahabyazdi

Hi It's because you are rendering custom input. You need to set placeholder directly to it.

I passed it to the component like this , still not showing it, I am using <InputIcon/> compoenent provided by react-multi-date-picker <InputIcon className="form-control ml-2" placeholder="From - To" />

jees47 avatar Jan 28 '22 11:01 jees47

I will work on it ...

shahabyazdi avatar Jan 28 '22 12:01 shahabyazdi

I will work on it ...

okay, thanks for your reply

jees47 avatar Jan 28 '22 12:01 jees47

fixed in v3.3.1.

shahabyazdi avatar Sep 10 '22 07:09 shahabyazdi