Working on the time tracker
This commit is contained in:
parent
66cf5f0d32
commit
a0188cd630
1 changed files with 5 additions and 3 deletions
|
|
@ -118,12 +118,14 @@
|
|||
name: 'times',
|
||||
source: timeMatcher(defaultTimes)
|
||||
}).on('typeahead:change', function(element, datum, name) {
|
||||
console.log('change: ' + datum)
|
||||
var value = valueAccessor();
|
||||
var duration = moment.duration(datum).asSeconds();
|
||||
if (datum && datum.indexOf(':') >= 0) {
|
||||
var duration = moment.duration(datum).asSeconds();
|
||||
} else {
|
||||
var duration = parseFloat(datum) * 60 * 60;
|
||||
}
|
||||
value(duration);
|
||||
}).on('typeahead:select', function(element, datum, name) {
|
||||
console.log('select: ' + datum)
|
||||
var value = valueAccessor();
|
||||
var duration = moment.duration(datum).asSeconds();
|
||||
value(duration);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue