Comments (8)
Hello everyone 👋
Sorry for the delay. Thanks for your interest in this package. It seems to be a strange bug indeed. I have never encountered this problem since. Maybe it's because I haven't been around lately to follow the evolution of the package.
Thanks for your PR @AnalogMemory. I will take a look at it.
from react-tailwindcss-datepicker.
The default is indeed YYYY-MM-DD, so it should've been 2023-01-04. Testing it today, I'm getting 2023-01-03. Must be a bug. Are you overriding the displayFormat
prop accidentally? A potential workaround could also be to specify the displayFormat="YYYY-MM-DD
, that could fix the bug
from react-tailwindcss-datepicker.
I'm using the following options :
i18n={"fr"}
inputClassName=""
value={{
startDate: date,
endDate: date,
}}
useRange={false}
asSingle={true}
startFrom={new Date(Date.now())}
onChange={(newValue) => console.log(newValue)}
The fix I made was to convert the date with the Date object: (it fixes the leading zero missing)
console.log(date); // 2020-1-1
const leadingZeroDate = new Date(date);
console.log(leadingZeroDate) // 2020-01-01
from react-tailwindcss-datepicker.
Weird bug. Could be related to the i18n format?
from react-tailwindcss-datepicker.
Hi @aleguern,
Thank you for the feedback. We'll try to look into it.
or, opening PRs are very much welcome.
from react-tailwindcss-datepicker.
Hi I'm running into this same issue in the latest 1.4.2 release from npm. Is the fix for this not in that release?
When selecting a date from the picker I'm getting 2023-2-7
even when setting displayFormat={'YYYY-MM-DD'}
Any thoughts? I can try manually fixing the output before passing it to downstream functions, but that still seems like an incorrect result
from react-tailwindcss-datepicker.
I have the same problem also with latest version.
from react-tailwindcss-datepicker.
@JefteCaro there is open PR that would fix this issue
from react-tailwindcss-datepicker.
Related Issues (20)
- localization of displayFormat
- Override input element and control initial months displayed
- How to disable weekends ?
- "Last 30 days" shortcut does not show consecutive months
- Value not displaying HOT 2
- Editing value manually doesn't update widget if done at the start
- Missing comma in demo code
- Calendar not showing previous month when using different dayjs.locale()
- id attribute not passed on to underlying input
- custom classnames
- Feature Request: Can you add a time range, e.q. 08:00 - 14:00
- Masks
- Read-only mode not working
- State of the project HOT 1
- Modal is not adjusting according to height HOT 2
- Pop up is displayed below another component despite a higher z Index container
- Weird date selection behaviour in react tailwindcss datepicker
- Add shortcutClassName property HOT 1
- Hide/show year feature
- Selected date background is not showing. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-tailwindcss-datepicker.