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

Suggestion: date widgets can differ per date. Following logic change can help it. #9

Closed
linuxeasy opened this issue Nov 10, 2018 · 1 comment
Labels

Comments

@linuxeasy
Copy link

linuxeasy commented Nov 10, 2018

  final Map<DateTime,Widget> markedDates;

  Widget _renderMarked(DateTime now) {
    if (widget.markedDates != null && widget.markedDates.length > 0) {
      for (DateTime key in widget.markedDates.keys) {
        if (key.year == now.year && key.month == now.month && key.day == now.day) {
          return widget.markedDates[key] == null
              ? widget.markedDateWidget
              : widget.markedDates[key];
        }
      }
    }
    return Container();
  }
}

image

See different date widgets for date 3 and 4.

Btw, awesome work guys!

@hyochan
Copy link
Member

hyochan commented Nov 11, 2018

I've updated to 1.1.8 to support this feature check this out.

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

No branches or pull requests

2 participants