I have found value from testing date time issues at all layers of an application. Which layer is determined by what I am trying to test. For instance:
Testing Functional Logic:
Assuming for a second that you don't have core logic built into your UI code (Model View Separation or something similar). It is often easier to test the core logic layer by mocking up the UI and dealing with core logic date testing as strict API functional testing. How much testing you do is basically limited by time and resources to automate then.
Using this methodology you can select a test set based on (some examples):
- Brute Force: Test all valid date range inputs. This is feasible when your date handling logic is fast, or the valid list of date is small (like years as input, excluding months and days).
- 80% User Scenario: Use data analysis of usage patterns to determine a subset of tests that will keep 80% of your user base happy. This is useful if you are selecting something similar to birthday entry, when your target demographic is tweens. Yes some octogenarians may use the site but your core audience is kept happy.
- Edge Cases: Leap years, Date Addition (does Jan 30+1 month == Feb 28)?, Time Zone?
ect ect ect
Because this list is long and you get better coverage the more per formant the code is, it gets very hard to automate this Functional Logic testing through a UI automation framework.
Testing UI Functionaliy:
I believe in using a UI framework to test basic functionality of the UI (does the UI give information to the backend correctly). These slower, possibly more error prone (sometimes complicated tests) to a minimum also increases your test maintainability (since frequent UI changes don't break you).
Testing UI Date Time Usability
This is something I have never fully been able to automate. This is basically the realm of the manual tester, large beta groups, user research studies, or common sense. Does the date picker make you scroll through every year starting at 1900? That wont get caught until somebody actually has to use it.