Pick one internal format for stored dates (commonly ISO 8601) and stick to it across collections and APIs
Be explicit about timezones when your app spans regions: decide whether dates represent a user’s local time or a fixed timezone
Use formulas to keep formatting consistent, instead of formatting dates differently on each page
When filtering datasets, normalize values first (e.g., compare “start of day” to “end of day” for inclusive ranges)
FAQs
1. How do I add a Date Picker to a WeWeb form?
Enable the Date extension and drag a Date Picker element onto your page from the elements panel. Bind its value to a variable or form field so the selected date (or range) is available in workflows and submissions.
2. What selection modes are supported by the Date Picker?
The Date Picker supports single date, date range, and multi‑date selection. It can also be configured in date‑only, time‑only, datetime, month, or year modes depending on the use case.
3. How can I restrict which dates users can pick?
You can set minimum and maximum dates, disable specific dates or weekdays, and limit the number of selected dates in multi‑date mode. For ranges, modes like Auto and Min/Max let you control the minimum or maximum distance between start and end dates.
4. How do I format dates for display or APIs without writing JavaScript?
Use date formulas like formatDate and toDateISO, which rely on Day.js under the hood. These formulas can be used directly in bindings to show human-readable dates in the UI or send ISO strings to your backend.
5. Can I handle time zones and “time ago” labels natively?
Yes, getBrowserTimezone exposes the user’s timezone, and toTime returns relative strings such as “2 months ago” or “in 10 minutes”. Both are available in the formula system so you can build timezone‑aware displays and activity feeds without custom code.