Closed carloguli closed 5 years ago
Yeah. This does not surprise me. DST is a pain. It's due to when the DST switch takes place - and I suspect this problem doesn't crop up in the US, because we use the 2a / 3a barrier, and it looks like BST uses a 1a barrier for one of the switches. Maybe. I think.
At any rate, Math.round shouldn't break anything, and I'll do some more digging about how I can coerce my browser into believing odd things about today's date to try and track down a better / more robust fix.
Re: 183feb2
Fwiw, this is going to be fixed in v5, as I've changed how min/max works - it not corresponds to "minDate" and "maxDate", which makes a whole lot more sense, and coincidentally, is what is actually in the HTML5 spec.
When linking date boxes in the way suggested @ http://dev.jtsage.com/DateBox/doc/6-2-link/ the call to
applyMinMax
fails to apply the correct restriction whenobby.date
is not a daylight saving date and today is or vice versa. For instance if I initially select January 1st (GMT) and today is May 8th (BST) using the suggested code, i.e. adding 1 day, I should be able to select Jan 2nd on the linked box, but the first available date is instead Jan 3rd. I think this is becauseapplyMinMax
setsoptions.minDays
toparseInt(daysRaw)
instead ofMath.round(daysRaw)
. I suspectoptions.maxDays
is affected in a similar way