olehj / disklocation

Disk Location is a plugin for Unraid.
https://forums.unraid.net/topic/77302-plugin-disk-location
GNU General Public License v3.0
21 stars 3 forks source link

Bug/Functionality: Inconsistent action when filling dates #251

Closed Karyudo closed 7 months ago

Karyudo commented 8 months ago

When filling in Purchase Date, after typing a four-digit year, the Year stays highlighted, instead of moving to the two-digit Month column. After typing the two-digit month, the highlighting (correctly, in my opinion!) moves to the Day column.

olehj commented 8 months ago

The dates are stored in ISO format, the only really sensible way of storing a date. What you enter in the browser are depending on your locale setting for your browser and has nothing to do with the plugin itself. Not sure what you mean with the highlighting etc. but it's just a part of pure HTML5.

If it's about how US dates works etc. then I can't be bothered, so I'm closing this.

Karyudo commented 8 months ago

No, I'm 100% with you: ISO 8601 is the best and only date format! I'm in Canada, and it drives me nuts that both US and UK date formats get used here. Microsoft and Google both try to force MM/DD/YYYY, rather than just letting me use something superior. But I don't think that's the issue here.

If I type a four-digit year in the Year field, the cursor/highlighting stays on Year, and doesn't move to Month. It will apparently also accept a six-digit year, and this seems to be the only way that the highlighting/cursor will automatically move to Month. This seems wrong. If it's not a bug, it's a clunky UI choice.

If I type a two-digit month in the Month field, the cursor/highlighting correctly moves to Day. This is how Year should also work, but doesn't.

On Fri, Jan 19, 2024 at 4:39 PM FlamongOle @.***> wrote:

The dates are stored in ISO format, the only really sensible way of storing a date. What you enter in the browser are depending on your locale setting for your browser and has nothing to do with the plugin itself. Not sure what you mean with the highlighting etc. but it's just a part of pure HTML5.

If it's about how US dates works etc. then I can't be bothered, so I'm closing this.

— Reply to this email directly, view it on GitHub https://github.com/olehj/disklocation/issues/251#issuecomment-1901447417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFIMUEEGB4PX7UW32C7OFTYPMG43AVCNFSM6AAAAABCA2V5V2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGQ2DONBRG4 . You are receiving this because you authored the thread.Message ID: @.***>

Karyudo commented 8 months ago

Made a quick video to show the error. https://imgur.com/a/0OaOCBk

On Fri, Jan 19, 2024 at 4:47 PM Karyudo @.***> wrote:

No, I'm 100% with you: ISO 8601 is the best and only date format! I'm in Canada, and it drives me nuts that both US and UK date formats get used here. Microsoft and Google both try to force MM/DD/YYYY, rather than just letting me use something superior. But I don't think that's the issue here.

If I type a four-digit year in the Year field, the cursor/highlighting stays on Year, and doesn't move to Month. It will also accept a six-digit year, apparently. This seems wrong. If it's not a bug, it's a clunky UI choice.

If I type a two-digit month in the Month field, the cursor/highlighting correctly moves to Day. This is how Year should also work, but doesn't.

Cheers, Greg

On Fri, Jan 19, 2024 at 4:39 PM FlamongOle @.***> wrote:

The dates are stored in ISO format, the only really sensible way of storing a date. What you enter in the browser are depending on your locale setting for your browser and has nothing to do with the plugin itself. Not sure what you mean with the highlighting etc. but it's just a part of pure HTML5.

If it's about how US dates works etc. then I can't be bothered, so I'm closing this.

— Reply to this email directly, view it on GitHub https://github.com/olehj/disklocation/issues/251#issuecomment-1901447417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFIMUEEGB4PX7UW32C7OFTYPMG43AVCNFSM6AAAAABCA2V5V2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGQ2DONBRG4 . You are receiving this because you authored the thread.Message ID: @.***>

olehj commented 8 months ago

Looks like I found the cause, didn't know it was a thing that it expanded beyond 4-digit year: https://stackoverflow.com/questions/64660946/html-is-there-a-way-to-limit-the-year-to-4-digits-in-date-input

I never encountered this problem as my locale is DD.MM.YYYY by default (sadly). Will fix this next release.

Karyudo commented 8 months ago

Yeah, I guess if YYYY is the last thing one types (whether DD.MM or MM.DD precedes it) then it's pretty easy to not notice that YYYYYY is also accepted! Glad to see you found a fix, and it's great to hear it will be implemented in the next release. Thanks!