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

How to show dates marked on the calendar separate from selectedDate? #4

Open
DitoXD opened this issue Jul 23, 2023 · 1 comment
Open

Comments

@DitoXD
Copy link

DitoXD commented Jul 23, 2023

I'd like to mark dates before and after DateTime.now() but I'm not sure how to go about that. I'd like to mark multiple dates across the calendar and be able to set props for those dates differently before and after DateTime.now(). Any assistance or recommendations for it?

@CyMathew
Copy link

CyMathew commented Aug 18, 2023

You could use itemBuilder to specify styling on certain dates. itemBuilder provides fullDate so you can do something like

itemBuilder: (context, dayNumber, dayName, monthName, fullDate, isSelected) {
  if((DateUtils.isSameDay(fullDate, YourMarkedDate)) { 
    return customMarkedDateWidget;
  }
  return regularDayWidget;
}

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

2 participants