Editor filter by last modified date uses wrong date pattern to validate

Description

Before it sends the dates to the server, the GWT editor tries to validate the date string is correct. But the pattern was wrong (yyyy-mm-dd). It should be yyyy-MM-dd. So entering 2015-08-31 will be rejected as invalid. However if a date is not 31, it will pass the validation and the server will return correct result (server parsing pattern is correct).

Environment

None

Activity

Show:
Carlos Munoz
September 17, 2015, 3:32 AM

Patrick, the fact that the 31 is what triggers the validation failure made me think about this for a bit. After talking to Sean, he pointed out that if a month is not being specified by the pattern (only minutes were), then a default month is used. This default is perhaps the current month, which at the moment of this comment is September, which doesn't have the day 31. Changing the format as you say should indeed fix the problem, I just wanted to find a more suitable explanation to what is happening.

Patrick Huang
September 17, 2015, 10:30 PM

Yes that's what happened. Unlike in java land the default month is 0. In javascript it seems to be the current month.

Ready for Release

Assignee

Patrick Huang

Reporter

Patrick Huang

Labels

None

Tested Version/s

None

Components

Sprint

None

Fix versions

Affects versions

Priority

unspecified
Configure