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

onBlur execute while entring the date

Open NematAnsari opened this issue 4 months ago • 0 comments

Before you start - checklist

  • [X] I followed instructions in documentation written for my React-Date-Picker version
  • [X] I have checked if this bug is not already reported

Description

actually I disable calendar and i am manually entering the date while iam entring date onblur functions executes instead of iam clicking any where or focusing out as i enter day on blur executes how can i prevent them from executing until iam not clicking any where

<DatePicker calendarClassName={appStyles.bfpDatePickerCalendar} className={appStyles.bfpDatePicker} format={appConstants.datePickerFormat} value={values.main_applicant} dayPlaceholder='dd' monthPlaceholder='mm' yearPlaceholder='yyyy' id='main_applicant' onChange={(value) => { setFieldValue("main_applicant", value); }} onBlur={handleBlur("main_applicant")} onKeyDown={(e: any) => { const inputValue = e.target.value; const year = inputValue.slice(-4); if (year.length === 4 && e.key.length === 1) { e.preventDefault(); } }} calendarIcon={() => { return <Calendar />; }} clearIcon={() => { return <Clear />; }} disableCalendar={true} />

Steps to reproduce

first disable calendar and start date manually

Expected behavior

after i enter date then show touched true else false

Actual behavior

touched becomes true while iam entering the date

Additional information

............................

Environment

  • Browser (if applicable):
  • React-Date-Picker version:
  • React version:

NematAnsari avatar Feb 20 '24 06:02 NematAnsari