按日期查找 Pouchdb 文档

问题描述

我创建了数据库并插入了下面的记录是我的文档

 var doc = {
      _id: Sno,Date:date,time:Time,trip : Trip,triptype:TripType,vechicleNo: VechicleNo,customer: Customer,vechicletType: VechicleType,};

现在我想根据日期选择获取

image

在选择日期时,我想根据日期获取所有值 我使用了 find 插件,但即使有特定日期的数据,它也会将 doc 显示为 0

这是我的查找插件代码

\\getting the date value on select
var saledate = document.getElementById('startdate').value;
   console.log(saledate);

   db.createIndex({
      index: {
        fields: ['Date']
      }
   });

   db.find({
        selector: {
          Date: saledate,// assigning date value to the selector
        },});
   }).then(function (response) {
      console.log(response);
   }).catch(function (err) {
      console.log(err);
   });

谁能帮我写代码

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)