Open MrMohamedAbdallah opened 2 years ago
You can use getClasses
prop.
<date-picker :get-classes="getClasses" />
{
methods: {
getClasses(cellDate, innerValue) {
const length = innerValue.length
const classes = []
if (length) {
if (cellDate.getTime() == innerValue[0].getTime()) classes.push('is-start');
if (cellDate.getTime() == innerValue[length - 1].getTime()) classes.push('is-end');
}
return classes
}
}
}
Yeah, but that PR is to make it a feature in the library itself.
It will make it easier for styling, no need to add the getClasses
prop in each instance for such a simple classes.
@mengxiong10 will that be merged soon?
That feature allow users to style the first and last cell in the dates range and single date.
For example, adding a border radius to the first and last ones.