I am using Dexie (library for IndexedDb). I am going through the API to see if there is a way to select events between two dates and I see there is a .between()
method used this way:
table.where(indexOrPrimKey).between(lowerBound, upperBound, includeLower, includeUpper)
In all the examples it is used with numbers, did anybody try using it with dates? do I need to use a specific date format?
IndexedDB supports indexing number, string, Date and Arrays of such. So in practice, store your dates as any of these types and they will be indexable. Would personally prefer Date or number for the date before string even if it is possible to index the string format as well.