Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
firestore returns empty array while using date filter in capacitor js

This below code i used to retrieve data from firestore

it works good in desktop

myfirebasedb=[]

await db.collection("myfirebasedb")
.where("date", ">=",moment(payload.from_date).format('DD-MM-YYYY'))
.where("date", "<=",moment(payload.to_date).format('DD-MM-YYYY'))
.get()
.then((querySnapshot) => {
      myfirebasedb=_.map(querySnapshot.docs,(doc)=>{ return {firebase_id:doc.id,...doc.data()}})
})
.catch((error) => {
    reject(error)
    console.log("Error getting documents: ", error);
});

See the docChanges it gives the four objects ,this exactly what i want but same code in capacitor js act like a strange ,i also posted mobile debug image below

enter image description here

Getting empty result here Same code in capacitor js returns nothing

enter image description here

i am only facing when implementing where tag in firestore it gives empty result in capacitor js but desktop works what i want.

my firebase data

enter image description here

updated:date filter works if i put single where in mobile

await db.collection("myfirebasedb")
.where("date", ">=",moment(payload.from_date).format())
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!