Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <div id="app">
  2. <div class="dropdown-menu">
  3. <div class="input-group date">
  4. <label>from:</label>
  5. <input size="16" type="text" v-date v-model="queries.start_date" class="form_datetime" readonly="">
  6. <span class="input-group-addon">
  7. <span class="calendar-icon"></span>
  8. </span>
  9. </div>
  10. <div class="input-group date form_datetime">
  11. <label>to:</label>
  12. <input size="16" type="text" v-date v-model="queries.end_date" class="form_datetime" readonly>
  13. <span class="input-group-addon">
  14. <span class="calendar-icon"></span>
  15. </span>
  16. </div>
  17. </div>
  18. </div>
  19.  
  20. Vue.directive('date', {
  21. twoWay: true,
  22. bind: function (el) {
  23. $(el).datetimepicker({
  24. format: "mm/dd/yyyy",
  25. autoclose: true,
  26. minView: 2,
  27. daysShort: true
  28. });
  29. }
  30. });
  31.  
  32. var vm = new Vue({
  33. el: '#app',
  34. data: {
  35. queries: {
  36. start_date: "",
  37. end_date: "",
  38. }
  39. },
  40. methods: {
  41. testVal: function () {
  42. console.log([this.queries.start_date, this.queries.end_date]);
  43. }
  44. }
  45. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement