Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start of week day other than Sunday? #26

Open
RobertNeher opened this issue Jun 27, 2021 · 3 comments
Open

Start of week day other than Sunday? #26

RobertNeher opened this issue Jun 27, 2021 · 3 comments

Comments

@RobertNeher
Copy link

In Western Europe the week does not start with Sunday as in US. Is it possible to change this fact to by parameter?

@pedromorgan
Copy link

Same here, need Monday to be first day (iso style)

@sema1995
Copy link

sema1995 commented Jul 22, 2022

Sorry to answer this on 2022 but im using this and i had the same issue so i fixed it.
If you want to start the day another than sunday just edit this:

calendar\src\components\days_row\days_row.dart

Widget build(BuildContext context) {
    return Expanded(
      child: Row(
        children: dates.map((date) {
          // here we use +1 to add 1 more day then is monday.
          var newDate = new DateTime(date.year, date.month, date.day + 1);
          return _DayCell(
            newDate,
            visiblePageDate,
            dateTextStyle,
          );
        }).toList(),
      ),
    );
  }

@sema1995
Copy link

sema1995 commented Jul 22, 2022

In Western Europe the week does not start with Sunday as in US. Is it possible to change this fact to by parameter?

Sorry to answer this on 2022 but im using this and i had the same issue so i fixed it.
If you want to start the day another than sunday just edit this:

calendar\src\components\days_row\days_row.dart

Widget build(BuildContext context) {
    return Expanded(
      child: Row(
        children: dates.map((date) {
          // here we use +1 to add 1 more day then is monday.
          var newDate = new DateTime(date.year, date.month, date.day + 1);
          return _DayCell(
            newDate,
            visiblePageDate,
            dateTextStyle,
          );
        }).toList(),
      ),
    );
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants