Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="app">
- <div class="dropdown-menu">
- <div class="input-group date">
- <label>from:</label>
- <input size="16" type="text" v-date v-model="queries.start_date" class="form_datetime" readonly="">
- <span class="input-group-addon">
- <span class="calendar-icon"></span>
- </span>
- </div>
- <div class="input-group date form_datetime">
- <label>to:</label>
- <input size="16" type="text" v-date v-model="queries.end_date" class="form_datetime" readonly>
- <span class="input-group-addon">
- <span class="calendar-icon"></span>
- </span>
- </div>
- </div>
- </div>
- Vue.directive('date', {
- twoWay: true,
- bind: function (el) {
- $(el).datetimepicker({
- format: "mm/dd/yyyy",
- autoclose: true,
- minView: 2,
- daysShort: true
- });
- }
- });
- var vm = new Vue({
- el: '#app',
- data: {
- queries: {
- start_date: "",
- end_date: "",
- }
- },
- methods: {
- testVal: function () {
- console.log([this.queries.start_date, this.queries.end_date]);
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement