function checkForm(that) {
    var newValue = $(that).val()
    var matches = newValue != '' ? newValue.match(timeRegEx) : ''
    var error = $(that)
      .closest('.time-spinner')
      .find('.error_container')
    var $closerTimeSpinner = $(that)
      .closest('.time-spinner')
      .find('.spinner-control')

    if (matches) {
      $(error).html('')
      //$closerTimeSpinner.find('.spinner-hour input').val(timeRegEx.split(':')[0]);
      //$closerTimeSpinner.find('.spinner-min input').val(timeRegEx.split(':')[1]);
      return true
    } else {
      var errMsg = 'Formato data non valido'
      $(error).html(errMsg)
      //$(that).val('Formato data non valido')
      return false
    }
  }
function checkForm(that) {
    var newValue = $(that).val()
    var matches = newValue != '' ? newValue.match(timeRegEx) : ''
    var error = $(that)
      .closest('.time-spinner')
      .find('.error_container')
    var $closerTimeSpinner = $(that)
      .closest('.time-spinner')
      .find('.spinner-control')

    if (matches) {
      $(error).html('')
      
      
      return true
    } else {
      var errMsg = 'Formato data non valido'
      $(error).html(errMsg)
      
      return false
    }
  }
function checkForm ( that ) { var newValue = $ ( that ) . val ( ) var matches = newValue != '' ? newValue . match ( timeRegEx ) : '' var error = $ ( that ) . closest ( '.time-spinner' ) . find ( '.error_container' ) var $closerTimeSpinner = $ ( that ) . closest ( '.time-spinner' ) . find ( '.spinner-control' ) if ( matches ) { $ ( error ) . html ( '' ) //$closerTimeSpinner.find('.spinner-hour input').val(timeRegEx.split(':')[0]); //$closerTimeSpinner.find('.spinner-min input').val(timeRegEx.split(':')[1]); return true } else { var errMsg = 'Formato data non valido' $ ( error ) . html ( errMsg ) //$(that).val('Formato data non valido') return false } }
TIME VALIDATION FOR DATA ENTRY
TIME VALIDATION FOR DATA ENTRY