vue自定义日期组件

vue-datepicker

基于 vuejs 2.x 可自定义主题的日期组件

github

DMOE

Installation

npm install aotu-calendar --save

Usage

只需要在项目中加入 calendar.vue,就可以使用了。


向组件传入prop即可改变 calendar 的样式


Props

type(String): 默认 single(选择单天),可选 range(选择多天) / time(选择单天 + 时间)

isAbandon(Boolean): 默认 true,早于系统日期的日期选项是否不可选

showInput(Boolean): 默认 true,是否展示输入框*`theme(String)`: 默认 #e57373,主题色

themepannelbg(String): 默认 #fff,pannel 背景颜色*`themeheadercolor(String)`: 默认 #fff,pannel 头部字体颜色

themeheaderyear(String): 默认为空,pannel 头部年份字体颜色,为空则跟随 themeheadercolor 值

themeheadermonth(String): 默认为空,pannel 头部月份字体颜色,为空则跟随 themeheadercolor 值

themeheadersep(String): 默认为空,pannel 头部“/”字体颜色,为空则跟随 themeheadercolor 值

themeleftarrow(String): 默认为空,pannel 头部左箭头颜色,为空则跟随 themeheadercolor 值

themerightarrow(String): 默认为空,pannel 头部右箭头颜色,为空则跟随 themeheadercolor 值

themeheaderbg(String): 默认为空,pannel 头部背景颜色,为空则跟随 theme 值

themeweekcolor(String): 默认为空,星期字体颜色,为空则跟随 theme 值

themeborder(String): 默认为空,底部边框,为空则 color 跟随 theme 值, width = 1px, style = solid

themeselbg(String): 默认为空,选中日期背景颜色,为空则跟随 theme 值

themeselcolor(String): 默认 #fff,选中日期字体颜色

themebtnborder(String): 默认为空,按钮边框颜色,为空则跟随 theme 值

themebtnconbg(String): 默认为空,确认按钮背景颜色,为空则跟随 theme 值

themebtncanbg(String): 默认 #fff,取消按钮背景颜色*`themebtnconfirmcolor(String)`: 默认 #fff,确认按钮字体颜色

themebtncanclecolor(String): 默认 #000,取消按钮字体颜色

themecurmonthcolor(String): 默认 #000,当前月份日期的字体颜色

themeprevmonthcolor(String): 默认 #aaa,上月日期的字体颜色

themenextmonthcolor(String): 默认 #aaa,下月份日期的字体颜色

themenotallowcolor(String): 默认 #aaa,无效日期的字体颜色,仅 isAbandon 为 true 有效

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,288评论 19 139
  • ¥开启¥ 【iAPP实现进入界面执行逐一显】 〖2017-08-25 15:22:14〗 《//首先开一个线程,因...
    小菜c阅读 6,792评论 0 17
  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 174,866评论 25 709
  • 轻快四人驾 驱车到县城 行程七八里 笑语满车盈
    端阳香草阅读 180评论 0 3
  • 文/小鱼儿 偶然读到一个故事,故事说,某个人养了一只狗。狗越长越大,不但吃得越来越...
    小鱼儿小鱼儿阅读 537评论 0 0