Skip to content

Fix splitDateTime function to work with IE7 #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2012

Conversation

tobiasbunyan
Copy link
Contributor

The syntax for the second part of the splice does not work in IE7 (possibly others I haven't checked).  Have changed to a zero start index without reversing the sign of the timePartsLen.  As splice removes elements from the array, this way makes more logical sense anyway.  Works in IE7, IE9 and chrome 21.0. 

The syntax for the second part of the splice does not work in IE7 (possibly others I haven't checked).  Have changed to a zero start index without reversing the sign of the timePartsLen.  As splice removes elements from the array, this way makes more logical sense anyway.  Works in IE7, IE9 and chrome 21.0. 
@trentrichardson
Copy link
Owner

Thanks for your help! You are a bit off though. The first element of the array is date, the second is time. So that 0 should be replaced with splice(allPartsLen-timePartsLen). That will get us to the end of the date and beginning of time.

@tobiasbunyan
Copy link
Contributor Author

But splice removes the elements you specify. So after the first splice, there is only the time section left.
At least thats how it works for me.

Date: Tue, 18 Sep 2012 04:49:04 -0700
From: notifications@github.com
To: jQuery-Timepicker-Addon@noreply.github.com
CC: tobiasbunyan@hotmail.com
Subject: Re: [jQuery-Timepicker-Addon] Fix splitDateTime function to work with IE7 (#439)

Thanks for your help! You are a bit off though. The first element of the array is date, the second is time. So that 0 should be replaced with splice(allPartsLen-timePartsLen). That will get us to the end of the dat and beginning of time.

          —

          Reply to this email directly or view it on GitHub.

@trentrichardson
Copy link
Owner

Aah yes, sorry. It is still early morning here.. I will merge. Thanks!!

trentrichardson added a commit that referenced this pull request Sep 18, 2012
Fix splitDateTime function to work with IE7
@trentrichardson trentrichardson merged commit d7537f8 into trentrichardson:dev Sep 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants