1. /**
  2. * 该模块是日期选择组件,根据配置参数可进行多种日期类型选择<br>
  3. * <strong>
  4. * 页面需要导入的文件
  5. * <ul>
  6. * <li>cmp-picker.js</li>
  7. * <li>cmp-dtPicker.js</li>
  8. * <li>cmp-picker.css</li>
  9. * </ul>
  10. * </strong>
  11. * @module DtPicker
  12. * @subtitle 日期选择器
  13. */
  14.  
  15. /**
  16. * 日期选择<br>
  17. * @class DtPicker
  18. * @namespace cmp
  19. * @type {{}}
  20. */
  21.  
  22. /**
  23. * 日期选择
  24. * @constructor
  25. * @class DtPicker
  26. * @namespace cmp
  27. * @param {Object} options 组件配置参数,对该组件类型特性的定义,配置不同展示的方式不同
  28. * @param {String} options.type 选择使用的类型,其中<br>
  29. * <ul>
  30. * <li>datetime:年月日时分</li>
  31. * <li>date:年月日</li>
  32. * <li>time:时分</li>
  33. * <li>month:年月</li>
  34. * <li>hour:年月日(上午或者中午晚上,需要定义customData的数据);如:<br>
  35. * options.customData = {
  36. * "h":[{"text":"上午","value":"上午"},
  37. * {"text":"下午","value":"下午"},
  38. * {"text":"晚上","value":"晚上"}]}
  39. * options.labels = ["年", "月", "日", "时段", "分"];
  40. * </li>
  41. * <li>timeInterval:选择时间区间,可自定义时间段,需要定义customData的数据);如:<br>
  42. * options.customData = {
  43. * "hTwo":[{"text":"01分","value":"01"},{"text":"02分","value":"02"}],
  44. * "iTwo":[{"text":"03分","value":"03"},{"text":"04分","value":"04"}]}
  45. * </li>
  46. * </ul>
  47. * @param {String} [options.value] 设置默认值时间段,格式如:<br>
  48. * options.value = "15:38-16:38"
  49. * @demo cmp-dtpicker.html
  50. * @cutline [DEMO地址](/seeyon/cmp2.0/demo/demo/pagings/ui/cmp-dtpicker.html)
  51. * @returns {Object} 日期组件对象
  52. */
Top