组件:
pickupTime: string = ’ ’
this.pickupTime = moment().format(‘LT’);
console.log(‘pickup TIme’, this.pickupTime);
//display time in format 9:30 AM
或
pickupTime = new Date.toLocaleTimeString() //display time in format 9:30 AM
除非在
格式化,否则时间不会显示在pickupTime中toISOString()
example: pickupTime = new Date.toISOString()