Improved error handling.

This commit is contained in:
Martin Edenhofer 2015-09-28 19:33:11 +02:00
parent 6970999d92
commit db89f942c6
2 changed files with 4 additions and 4 deletions

View file

@ -65,8 +65,8 @@ class App.UiElement.date
item item
@format: (number) -> @format: (number) ->
if parseInt(number) < 10 if number isnt '' && Number(number) < 10
number = "0#{number}" number = "0#{Number(number)}"
number number
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) -> @setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->

View file

@ -79,8 +79,8 @@ class App.UiElement.datetime
item item
@format: (number) -> @format: (number) ->
if parseInt(number) < 10 if number isnt '' && Number(number) < 10
number = "0#{number}" number = "0#{Number(number)}"
number number
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) -> @setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->