react-datetime icon indicating copy to clipboard operation
react-datetime copied to clipboard

Date issue for month having 31 days

Open SupriyaArora25 opened this issue 4 years ago • 7 comments

I'm Submitting a ...

[x] Bug report
[ ] Feature request
[ ] Support request

Steps to Reproduce

  1. On September 2020 month window select 31 Aug
  2. Date entered in text box is 1st August 2020.
  3. Same is happening for 31 Jan, 31 Mar, 31 May.

Expected Results

Expected date should be the one which is selected.

Actual Results

This is occurring for months having 31 days, except July.

Minimal Reproduction of the Problem

Other Information (e.g. stacktraces, related issues, suggestions how to fix)

SupriyaArora25 avatar Oct 12 '20 10:10 SupriyaArora25

I've found out that this is causing issue due to moment behavior. If you try to set more number of days than in actual month, it will return next month's date.

This lines below causing issue in DateTime.js

	// Set the value into day/month/year
	viewDate[ this.viewToMethod[currentView] ](
		parseInt( e.target.getAttribute('data-value'), 10 )
	);

technoknol avatar Oct 13 '20 19:10 technoknol

@arqex your comments on this ? This looks like a critical bug.

technoknol avatar Oct 14 '20 10:10 technoknol

This is a pretty critical bug - any update on it?

tlouth19 avatar Nov 03 '20 22:11 tlouth19

Hello ... Any update on this ?? I have pull @technoknol folk to try but I did not see any different

tranhoanvo avatar Mar 12 '21 07:03 tranhoanvo

Any updates?

GKustov avatar Aug 09 '21 08:08 GKustov

The issue still persists with the latest version, any updates? :(

Macy6 avatar Nov 10 '22 17:11 Macy6

The issue still persists with the latest version, any updates? :(

the issue still persists with your force @Macy6, 31 February to January still error

tinhtony2506 avatar Feb 02 '23 05:02 tinhtony2506