Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasnteireho committed Feb 14, 2024
1 parent 2170b5a commit a018970
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/mobile/pages/fields/field/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,9 @@ export const FieldVM = DefineMap.extend('FieldVM', {
// format date to (mm/dd/yyyy) from acceptable inputs
value = this.normalizeDateInput($el.val())

console.log("changed")
console.log(value)
console.log(field.min)
console.log(field.max)
console.log(field)



// date bounds are in 6 or 8 digit texts
// need to change to same format as value
let maxDate =
field.max.substr(0,2) + "/" +
field.max.substr(2,2) + "/" +
Expand All @@ -330,13 +325,9 @@ export const FieldVM = DefineMap.extend('FieldVM', {
field.min.substr(2,2) + "/" +
field.min.substr(4)



if (Date.parse(value) < Date.parse(minDate)){
console.log("smaller")
value = minDate //field.min
} else if (Date.parse(value) > Date.parse(maxDate)){
console.log("bigger")
value = maxDate //field.max
}

Expand Down

0 comments on commit a018970

Please sign in to comment.