aboutsummaryrefslogtreecommitdiffstats
path: root/demos/spinner/time.html
diff options
context:
space:
mode:
Diffstat (limited to 'demos/spinner/time.html')
-rw-r--r--demos/spinner/time.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/demos/spinner/time.html b/demos/spinner/time.html
index 7fc1e26ce..175407f4a 100644
--- a/demos/spinner/time.html
+++ b/demos/spinner/time.html
@@ -24,13 +24,17 @@
_parse: function( value ) {
if ( typeof value === "string" ) {
+ // already a timestamp
+ if ( Number( value ) == value ) {
+ return Number( value );
+ }
return +Globalize.parseDate( value );
}
return value;
},
- _format: function() {
- return Globalize.format( new Date(this.options.value), "t" );
+ _format: function( value ) {
+ return Globalize.format( new Date(value), "t" );
}
});