datetimepicker: parsed date erroneously advances to next month

RESOLVED FIXED

Status

RESOLVED FIXED
14 years ago
12 years ago

People

(Reporter: gekacheka, Assigned: mostafah)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514

Sometimes parsed date advances to next month when current day of month exceeds
days in new month, regardless of new day of month.

Reproducible: Always
Steps to Reproduce:
1. Click new event on May 31 (2004-05-31) 
2. Change May 31 to June 15 (2004-06-15)

Actual Results:  
3. date becomes July 15 (2004-07-15)

Expected Results:  
3. date should stay June 15 (2004-06-15)
(Reporter)

Comment 1

14 years ago
Created attachment 149691 [details] [diff] [review]
datetimepicker.xbl patch: create new date rather than setting parts

Problem was that combined datetime was updated by setting the year, then month,
then date, but setting month to june temporarily made the date june 31 so the
month was advanced to july 1, and then setting the date of month set it to july
15.  

Setting the date first then the month is not a solution.  For example if
current date is june 15 and try to set date to may 31, then then setting the
date first will temporarily change the date to june 31, which becomes july 1,
and then changing the month to may results in may 1 rather than may 31.

This solution creates the combined date from the date parts of the new date and
the time parts of the old time.
(Assignee)

Comment 2

14 years ago
Checked in. Thanks
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: gurganbl → sunbird
You need to log in before you can comment on or make changes to this bug.