Ice Cream Jonsey wrote: Mon Nov 02, 2020 2:06 pm
If you clicked on the text field it brought up a calendar. It started with November 2020.
And you could only go backwards one month at a time.
And it demanded that you be at least 13.
So they want you to hit the "left" button 12x13 times.
It was brilliant webshit.
(Sigh.) This is really stupid. The only thing that makes any sene here is the requirement to be at least 13. That's a result of the Childrens Online Privacy Protection Act (of 1998) or COPPA, which makes it illegal to collect personal information from people under 13 absent verified parental permission.
But, this sort of thing can be done right, and not merely done
right but
elegantly done right. There is a program called "
Bulk File Changer" that is a great (and free) utility to change dates on files, either creation, access, update or any combination, and you can pick files or drag and drop them.
The date picker is one of if not the best I've ever seen.
* You click on the arrow button next to the date field, it brings up this month's calendar, with "November 2020" in top center and arrows to the left and right, which move one month, left earlier, right later.
* At the bottom is a box you can click on to choose today.'s date this item remains on every view.
* Click on the Month at the top and it switches to a display where it shows all 12 months and puts the year at the top with arrow keys to move left to the previous year or right to the current year.
* Click upon the year and it shows the decade, plus the year before and the year after, showing "2020-2030" with the arrow keys moving one decade.
* Click on the decade and it shows the ten decades of the century plus the last decade of the previous century and the first decade of the next.
* The arrow keys now move a century at a time. Or you pick an item and it goes back to decades, and so on.
* Beyond this, you may hold down the arrow keys to move continuously, Which it can do on any setting.
* You can select any date from 1600 to 9999.
Yep, there are things that can be done right. The crapware you discovered
isn't one of them, obviously.
* When one is doing web development I'm sure there are probably a dozen free calendar widgets in straight Javascript or a jQuery plug-in to do a decent, if not excellent, calendarpicker.
* For compiled languages I'm sure there are published libraries (like CPAN for Perl or something) for Java to use for this. They used to sell CD ROMs full of source code packages with hundreds or thousands of different functions. Use just one and you've saved your company the 10-20 bucks the disk cost, or if, as in my case, I bought it with my own money, it saves me hours of drudge work that someone else has already done.
This isn't just incompetence, because even stupid or lazy people like me know the best programming you can do is
not to do it at all, to figure out if you need it. The second best is to get someone else to do the work. And that's where using (for browser applications) a Javascript library like jQuery along with a plug-in for a pop-up date picker makes sense. And where you're using a compiled language, looking at published open source/software libre offerings makes more sense.
The third best way is to do the work when you're competent. This, in the example you showed, is
the worst way to do something, for someone who either doesn't know how and/or didn't care, and
never has to use it themselves. Because nobody puts those kind of abominations on their own back if they themselves have to use it.
Even if you can't find something on an MIT license (if you sell the software) it can probably give you ideas on how to correctly do it
This is why
dogfooding is the most important part of a developer's workstyle. If you have to use the software yourself you won't foist this kind of thing on yourself (or other people). We've found (in studies) that the practice has been proven to improve software usability and makes it be much better done.
I Just looked it up, a search for "java datepicker example" returned 849,000 hits on Google (many if not most using the
Swing graphical interface library), 2.4 million on Bing (same thing, they Swing), but on DuckDuckGo it does not tell you bhow many, just shows you a page at a time and requires you to click on a "show more" button, and there are more than four pages. Nonetheless there are
lots of options, probably almost all being better than that "spawn of..." no, "
interface of Satan" you found.