我正在使用定制的过滤器,但它不能按照要求工作
if(this.startdatefilter!=undefined && this.enddatefilter!=undefined){
this.filterArray.push( { type:'startDate' ,value: "Start Date : "+this.startdatetime},{ type:'endDate' ,value: "End Date : "+this.enddatetime})
filteredData = filteredData.filter(data => ((data.startDateTimeFilter)>=
(this.startdatefilter) ) && (data.startDateTimeFilter)<=(this.enddatefilter) )
} 日期格式为- Mon 11.11 2019 05:30:00 GMT+0530 (印度标准时间) startDateTimeFilter = Mon 11.11 2019 05:30:00 GMT+0530 (印度标准时间),清华大学11月7日2019年00:00:00 GMT+0530 (印度标准时间)。继续..。startdatefilter =清华11月7日2019年00:00:00 GMT+0530 (印度标准时间)
我想这是因为日期格式的原因..我尝试将日期字符串设置为2019年11月11日的格式,但不起作用。
有任何想法,请帮助..
发布于 2019-11-12 18:30:02
我把格式改成了dd-M-yyyy..它成功了!!
https://stackoverflow.com/questions/58815736
复制相似问题