date-picker.js 918 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Page({
  2. datePicker() {
  3. my.datePicker({
  4. currentDate: '2016-10-10',
  5. startDate: '2016-10-9',
  6. endDate: '2017-10-9',
  7. success: (res) => {
  8. my.alert({
  9. title: 'datePicker response: ' + JSON.stringify(res)
  10. });
  11. },
  12. });
  13. },
  14. datePickerHMS() {
  15. my.datePicker({
  16. format: 'HH:mm:ss',
  17. currentDate: '12:12:12',
  18. startDate: '11:11:11',
  19. endDate: '13:13:13',
  20. success: (res) => {
  21. my.alert({
  22. title: 'datePicker response: ' + JSON.stringify(res)
  23. });
  24. },
  25. });
  26. },
  27. datePickerYMDHMS() {
  28. my.datePicker({
  29. format: 'yyyy-MM-dd HH:mm:ss',
  30. currentDate: '2012-01-09 11:11:11',
  31. startDate: '2012-01-01 11:11:11',
  32. endDate: '2012-01-10 11:11:11',
  33. success: (res) => {
  34. my.alert({
  35. title: 'datePicker response: ' + JSON.stringify(res)
  36. });
  37. },
  38. });
  39. },
  40. });