Get the parameters of the <a-range-picker> date slider selector from the Ant Design Of Vue component library

Page usage

Insert picture description here

change implementation

bptjTimeChange(date, dateString) {
    
    
	console.log('date>>>>>>>>>>>>>>>', date);
    console.log('dateString>>>>>>>>>>>>>>>', dateString);
}

The date format obtained by dateString by default is yyyy-MM-dd

console printing
The following method can get the date accurate to the second

let startTime = date[0].format('YYYY-MM-DD HH:mm:ss')
let endTime = date[1].format('YYYY-MM-DD HH:mm:ss')
console.log('startTime', startTime)
console.log('endTime', endTime)

console printing
Ant Design Of Vue Date Picker URL
https://vue.ant.design/components/date-picker-cn/#API

Guess you like

Origin blog.csdn.net/qq_43647359/article/details/108649297