pqina / flip

⏳ The online version of the classic flip clock
https://pqina.nl/flip/
MIT License
892 stars 87 forks source link

Count stuck when set 30th of month and preset&format has "M" value #27

Closed djfoxer closed 2 years ago

djfoxer commented 3 years ago

My Code is simple:

       function handleTickInit(tick) {
            var opt = { format: ['y', 'M', 'd', 'h', 'm', 's'] };
            var ticker = null;
            ticker = Tick.count.down('2021-03-30', opt);
            ticker.onupdate = function (value) {
                tick.value = value;
            }
        }
<div class="tick" data-did-init="handleTickInit">
            <div data-repeat="true" data-layout="horizontal fit" data-transform="preset(y, M, d, h, m, s) -> delay">
                <div class="tick-group">
                    <div data-key="value" data-repeat="true" data-transform="pad(00) -> split -> delay">
                        <span data-view="flip"></span>
                    </div>
                    <span data-key="label" data-view="text" class="tick-label"></span>
                </div>
            </div>
        </div>

Count is stuck and nothing heppens:

image

When I change date to be different than 30th of month it runs. Also it runs when I remove "M" from preset and format. Strange...

djfoxer commented 3 years ago

You can see issue here: https://jsfiddle.net/hm9x6ndz/

rikschennink commented 2 years ago

(sorry a million years too late)

Just tested with 2022 and 30th of November 2021 and seems to work? Will close for now.