Good day to all!
After reading another
article about the problem with time in JavaScript (for Windows browsers (RU) after patch
KB2998527 ), I began to understand that very few people give a general solution for ExtJS 3.
You are probably already aware of the problem, and if not, you should read the article
“Chrome that stole Christmas .
” It is important for web developers whose clients are from the Russian Federation.
Even before the appearance of the article, I came across this bug. At first, my colleague and I thought that the problem with updating Chrom was, but after an hour they found the component that caused the hang, it was
Ext.form.TimeField . Further analysis led to the function:
')
generateStore: function(initial){ var min = this.minValue || new Date(this.initDate).clearTime(), max = this.maxValue || new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1), times = []; while(min <= max){ times.push(min.dateFormat(this.format)); min = min.add('mi', this.increment); } this.bindStore(times, initial); }
As you can see, a loop is used to get the values. At that time I changed it from for for c 0 to (24 * 60) / this.increment.
But after that, realizing what the problem is (in our case, this.initDate = '1/1/2008', where the next “missing” Wednesday 02/01/2008) wrote a small patch:
Ext.override(Ext.form.TimeField, { initDate: '2/1/2008' });
Those. we just specify the day so that the next is not a medium,
more . For new versions, everything is the same; they also use initDate there as 1/1/2008.