зеркало из https://github.com/mozilla/pjs.git
Fixing bug 192311, text entry does nothing for start and end dates. Modified datepicker to call back to callback function when onblur is called.
This commit is contained in:
Родитель
3e3dbcdcc4
Коммит
4fc40738db
|
@ -28,7 +28,7 @@
|
||||||
onset="this.update(val)"
|
onset="this.update(val)"
|
||||||
onget="return this.mValue"/>
|
onget="return this.mValue"/>
|
||||||
|
|
||||||
<property name="ondatepick"
|
<property name="ondatepick"
|
||||||
onset="this.callback = val;"
|
onset="this.callback = val;"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@
|
||||||
if (val) this.value = val;
|
if (val) this.value = val;
|
||||||
else this.value = new Date();
|
else this.value = new Date();
|
||||||
|
|
||||||
val = this.getAttribute("ondatepick");
|
val = this.getAttribute("ondatepick");
|
||||||
dump( "\ncallback is "+val );
|
|
||||||
if (val) this.callback = new Function( val );
|
if (val) this.callback = new Function( val );
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
|
@ -56,7 +56,9 @@
|
||||||
this.mTextBox.setAttribute("value", this.getPrettyDate(this.mValue));
|
this.mTextBox.setAttribute("value", this.getPrettyDate(this.mValue));
|
||||||
} else {
|
} else {
|
||||||
this.mValue = aValue;
|
this.mValue = aValue;
|
||||||
this.mTextBox.setAttribute("value", this.getPrettyDate(this.mValue));
|
this.mTextBox.setAttribute("value", this.getPrettyDate(this.mValue));
|
||||||
|
if( this.callback )
|
||||||
|
this.callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
]]></body>
|
]]></body>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче