2.1.7 • Published 6 years ago

aki-datepicker v2.1.7

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

vue-datepicker-mobile

996.icu LICENSE

v2

中文版

e.g.

Live Demo

demo

Props

paramdescriptiontypedefault
customcustom data.*object, array-
endTexttext of end for selectedstring'离店'
initDateInit position for visible month.Allow a string of date,default is this month.stringtoday
initLengthInit render length from init-date.number6
loadLengthscroll load render length every time.number6
mondayFirstWhether Monday is the first-day as a week, default for Sunday.booleantrue
selectAreaarea for allow user choose date. e.g.['2019-05-01', '2019-08-02']array-
selectedselect some area. Ibid.array-
singleselect single date.default select a range.booleanfalse
startTexttext of beginning for selectedstring'入住'
cancelTexttext for cancel buttonstring'取消'
confirmTexttext for confirm buttonstring'确认'
visibledisplay state, show or hide datepicker window.booleanfalse
weekTextstexts array of week namearray['一', '二', '三', '四', '五', '六', '日']

*

// 当key为月份如:'2019-05'时,value则为从当月1日开始的数据序列。可接受多个月份(多个key)
{
  '2019-04': [{custom1},{custom2},{custom29},{custom30}]
  '2019-05': [{custom1},{custom2},{custom30},{custom31}]
}
// 当key为具体日期如:'2019-05-20'时,value为从该日起的数据序列,自动往下一个月添加超出的数据
{
  '2019-04-09': [{custom1},{custom2},{custom29},{custom30},{custom99},{custom100},{custom2xx},{custom3xx}]
}
// 直接传入一个数组,相当于上面的key为当日
[{custom1},{custom2},{custom29},{custom30},{custom99},{custom100},{custom2xx},{custom3xx}]

custom

paramdescriptiontype
bgcbackground colorstring
disableddisabled statusboolean
colorcolor of textstring
infodisplay textsstring, object, array

info

paramdescriptiontype
textdisplay textstring
colorcolor of textstring

this color priority great than custom.color

full e.g.

[
  {
    bgc: '#abc',
    disabled: true,
    color: 'red',
    info: 'full'
  },
  {
    bgc: 'rgb(255,0,100)',
    info: ['001', '002']
  },
  {
    bgc: 'hsl(100,100%,50%)',
    color: 'rgba(99, 99, 99, .9)',
    info: { text: '007', color: 'hsla(60, 50%, 70%, .6)' }
  }
]

Event

select({ start, end, range })

Called after select date range.start: object, end: object, range:object. range is a selected array does't include start and end.If don't have space between start and end,range is a array of null.

Object Of Date

start: {
  date: new Date(), // current day
  data: {
    disabled: false,
    custom: {} // custom object
  }
}

cancel()

Called when click cancel button.

confirm({ start, end, range })

Called when click confirm button.

disable(date)

Called after selected a date has custom.disabled.date is a Object Of Date.

viewport(month)

Called when somemonth in viewport with window, return current month.

month: {
  date: new Date(), // this month
  days: [date1, date2, date29, date30] // all days for this month
}

Instructions

simple

<aki-date :visible="visible" @confirm="confirmHandler" @cancel="visible=false" />

Description

This project used Intersection Observer API

Thanks

date-utils

2.1.7

6 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

0.13.6

7 years ago

0.13.5

7 years ago

0.13.4

7 years ago

0.13.2

7 years ago

0.13.1

7 years ago

0.13.0

7 years ago

0.12.0

7 years ago

0.11.4

7 years ago

0.11.3

7 years ago

0.11.2

7 years ago

0.11.1

7 years ago

0.11.0

7 years ago

0.10.0

7 years ago