Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. $('#date').datetimepicker({
  2. pickTime: false,
  3. icons: {
  4. time: "fa fa-clock-o",
  5. date: "fa fa-calendar",
  6. up: "fa fa-arrow-up",
  7. down: "fa fa-arrow-down"
  8. },
  9. startDate: new Date()
  10. });
  11.  
  12. $('#date').datetimepicker({
  13. pickTime: false,
  14. icons: {
  15. time: "fa fa-clock-o",
  16. date: "fa fa-calendar",
  17. up: "fa fa-arrow-up",
  18. down: "fa fa-arrow-down"
  19. },
  20. minDate: moment()
  21. });
  22.  
  23. You can use this code, by using this code we can avoid additional scripts.
  24. var todayDate = new Date().getDate();
  25. var endD= new Date(new Date().setDate(todayDate - 15));
  26. var currDate = new Date();
  27. $('.datepicker').datepicker({
  28. format: 'dd/mm/yyyy',
  29. autoclose: true,
  30. startDate : endD,
  31. endDate : currDate
  32. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement