Skip to content

Inconsistent Datepicker Weekday Labels #1044

@Ncookiez

Description

@Ncookiez
  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Steps to reproduce

  1. Go to https://www.flowbite-react.com/docs/components/datepicker
  2. Click on the first datepicker example to view selector

Current behavior

The datepicker component is currently showing different weekdays for different users.

User A:
image

User B:
image

Expected behavior

Ideally these are always correct regardless of timezone, locale, or browser.

In this case, weekday labels should be starting on Sunday, and ending on Saturday to match correctly with the numbers below.

Context

In my case I fall into the "User A" category, seeing the wrong weekday labels. Can replicate this on Edge and Brave Browser (both Chromium-based). I am currently on GMT-4 timezone-wise. English locale.

This could be caused by a variety of issues as hinted above - the default weekStart on the component is set to Sunday, and I don't see this being overwritten on the docs app, so maybe something is wrong with how context is being gathered here, either due to locale or timezone specifics.

Alternatively, this could be due to timezone or locale issues on the getWeekDays() function here, although somewhat unlikely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't workingneeds infoFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions