Fix NocoDB date format by adding timestamps to date queries
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m22s
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m22s
NocoDB expects datetime values with timestamps, not just dates. Convert YYYY-MM-DD format to "YYYY-MM-DD HH:MM:SS" format: - dateFrom uses 00:00:00 (start of day) - dateTo uses 23:59:59 (end of day) This fixes the "422 - date is not supported" errors on admin dashboard and orders pages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e6d830ffd9
commit
e7c4fbca70
@ -89,11 +89,15 @@ export class NocoDBClient {
|
||||
}
|
||||
|
||||
if (filters.dateFrom) {
|
||||
conditions.push(`(CreatedAt,gte,${filters.dateFrom})`);
|
||||
// Convert YYYY-MM-DD to ISO timestamp at start of day
|
||||
const dateFromTimestamp = `${filters.dateFrom} 00:00:00`;
|
||||
conditions.push(`(CreatedAt,gte,${dateFromTimestamp})`);
|
||||
}
|
||||
|
||||
if (filters.dateTo) {
|
||||
conditions.push(`(CreatedAt,lte,${filters.dateTo})`);
|
||||
// Convert YYYY-MM-DD to ISO timestamp at end of day
|
||||
const dateToTimestamp = `${filters.dateTo} 23:59:59`;
|
||||
conditions.push(`(CreatedAt,lte,${dateToTimestamp})`);
|
||||
}
|
||||
|
||||
if (filters.minAmount !== undefined) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user