Sha256: eeb669b99e43bd5ab15f20e0e38baf52156bcaea409548fdd50467d297c8e654

Contents?: true

Size: 366 Bytes

Versions: 28

Compression:

Stored size: 366 Bytes

Contents

import Vue from 'vue';
import $ from 'jquery';

export default Vue.directive('node-datetime', {
  twoWay: true,
  bind: function() {
    let self = this;
    $(this.el).on('change', function(e) {
      let dateArray = $(this).siblings('select').andSelf().map(function() { return $(this).val(); }).get();
      dateArray[1]--;
      self.set(dateArray);
    })
  }
})

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
push_type_admin-0.9.0.beta.3 app/webpack/javascripts/directives/node-datetime.es6
push_type_admin-0.9.0.beta.2 app/webpack/javascripts/directives/node-datetime.es6
push_type_admin-0.8.2 app/webpack/javascripts/directives/node-datetime.es6
push_type_admin-0.8.1 app/webpack/javascripts/directives/node-datetime.es6
push_type_admin-0.8.0 app/webpack/javascripts/directives/node-datetime.es6
push_type_admin-0.8.0.beta.3 app/webpack/javascripts/directives/node-datetime.es6
push_type_admin-0.8.0.beta.2 app/webpack/javascripts/directives/node-datetime.es6
push_type_admin-0.8.0.beta.1 app/webpack/javascripts/directives/node-datetime.es6