Giter Site home page Giter Site logo

scrollable_clean_calendar's Issues

show year and month opposite in month header

Hi, I love this package cuz its conviniet and we can customize well.

One thing.
I have issue and want to suggest that month header will be able to show month and year opposite style.

defalut 
=> 2月 2023年

hope
=> 2023年 2月

Defalut expression is not fine in Japanese. So if we can use Widget like this , it will be great.

ScrollableCleanCalendar(
  monthHeader : MonthHeader.monthAndYear
  monthHeader : MonthHeader.yearAndMonth
)

I know there is dayBuilder, but it will be more usefull.
please consider it. thank you.

dai10512

Start day of week

Thanks for the great library.
When I change the 'startWeekDay' to DateTime.sunday, only Sunday date be shown, others invisible.
I tried to change all days of the week as the start day, but only Monday is ok.
I used the sample of this git(basic version).
If you need data or something from me, plz let me know.
Thanks in advance.

Screen Shot 2021-06-04 at 3 03 50 PM

Improve the test coverage

With the new major release version (1.0.0), we didn't do a good coverage test.

So it is good to work on the test coverage to improve it.

Wrong now day

Hello, thank you for great package, but I saw 2 issues, first of all I run example and start date is 28 Tuesday, but today is 27 Tuesday(see screenshots). Second: how can I set start week from Monday ?
IMG_7113
IMG_7114

Improve support for large screens

First of all, thank you for this great package. It looks great on regular phone screens.

But on a large screens the widget could use the screen real estate more efficiently. Currently it simply padded to stretch to the available width and the hight does not look pretty on a large screen.

image

Also, when selecting dates or interval on the large phone in a vertical layout or when used on a large-screen tablets, desktop or in web apps it is highly desirable to be able to see multiple months.

Here are couple examples showing MacOS calendar app and MS Outlook calendar (the left side panel).

image image

It would be great if the scrollable_clean_calendar widget would support multi-month view presentation and allowed to configure number of months shown horizontally and vertically. E.g. see 12 month layout in MacOS calendar above and 2 month vertical layout in MS Outlook.

New features

Hello,

I would like to submit a pull request with several new features:

  1. An initialMonthIndex parameter for opening the calendar on a specific date. This parameter will be used within the scrollable_positioned_list ListView. I couldn't use jumpToMonth because it throws a null error during runtime when used inside initState, and using Future.delayed to work around it seems unusual.
  2. The ability to incorporate custom logic for onDayClick. This would allow users to modify the date picking logic, such as changing the start date without removing the end date.
    What are your thoughts on these changes?

Thank you.

Want to change width / height ratio of days and weekdays element

Hello, I am a developer who is using your library very well.

Context of the problem

While using scrollable_clean_calendar, I was modifying the weekdays and days elements with weekdayBuilder and daysBuilder, and found that I could not change the width / height ratio of these elements.

What I want

I wanted the weekdays/days element in my app to be in a rectangular shape rather than a square, but no matter how much I set the width and height property of the Container in weekDayBuilder and dayBuilder, this does not change.

My temporary solution

After looking at the source code, I found that days_widget.dart and weekdays_widget.dart were creating child elements with GridView.count
In the end, I was able to set the width/height of the days and weekdays Container as I wanted by adding childAspectRatio to the code directly.

image

Request of this Issue

  • I think it would be better to add param that can set the width/height ratio of children to dayBuilder and weekdayBuilder.

  • If there is a way to set width / height ratio of days or weekdays widget which I couldn't found, please let me know.

Have a nice day :)

Add widgets

It's possible to add widgets besides the calendar? I want to add a container above the calendar and a button, but when I try to implement it, I get an error.

dayBuilder rebuilds every time when I click onDayTapped

Is it correct that the calendar rebuilds its daybuilder each time it runs onDayTapped?

calendarController = CleanCalendarController(
      //minDate: DateTime.now(),
      //maxDate: DateTime.now().add(const Duration(days: 365)),
      minDate: DateTime(2021, 9, 2),
      maxDate: DateTime(2022, 3, 1),
      onRangeSelected: (firstDate, secondDate) {},
      onDayTapped: (date) {
        print("Clean Calendar: " + date.toString());

...

ScrollableCleanCalendar(
                  locale: language,
                  scrollController: _controller,
                  calendarController: calendarController,
                  layout: Layout.DEFAULT,
                  calendarCrossAxisSpacing: 0,
                  dayBuilder: (context, values) {
                    print("values day: " + values.day.toString());

This takes very long because it rebuilds all the days from scratch. II think it is not so good for the performance.

Range color is not carried over to other months

Is there a problem when selecting dates between months? When selecting a date for example January 20th to February 20th, the color of the range is not maintained. Any suggestion on how to resolve?

Initial focus date

Cloud add initial focus date ?
Like minimum date time is 2000.1.1, but i want focus on today in first time.

daySelected color change to unselected color when update ui in onDayTapped method

CleanCalendarController get calendarController => CleanCalendarController(
        minDate: DateTime.now(),
        maxDate: DateTime.now().add(const Duration(days: 32)),
        onDayTapped: (d) {
          read.onChangedDateMain(d); <<<<<<<<<<<<<<<<<<calling method
          log('${d.timeZoneOffset.inHours}');
        },
        rangeMode: false,
        weekdayStart: DateTime.monday,
      );
void onChangedDateMain(DateTime date) {
    final formated = DateFormat('d MMMM,EEEE', 'en').format(date);
    choosedDateMain = formated;
    notifyListeners();
  }

_buildMonthLabelRow should concatenate two date formats to be valid for all locales

_buildMonthLabelRow should concatenate two date formats to be valid for all locales:

DateFormat('MMMM yyyy', widget.locale)
.format(
DateTime(month.year, month.month),
)
.capitalize(),

should be:

DateFormat('MMMM', widget.locale).format(DateTime(month.year, month.month)).capitalize() + ' ' + DateFormat('yyyy', widget.locale).format(DateTime(month.year, month.month))

otherwise when language has more complex variation by cases it will display inappropriate value.

eg. October 2021 in Polish is currently displayed as Października 2021 and it should be Październik 2021

Init date

How can I set the initial date and scroll to it?

If I have

minDate: DateTime(2010, 10, 1),
maxDate: DateTime(2030, 3, 1),

how can I scroll to DateTime.now() ?
Maybe it could work with scrollController. But jumpTo is not working because the months have an individual height.
Do you have a minimal example how this can be done?

Configure weekend days

Can we please have an option to choose the weekend days? It seems that the weekend days are always Saturday & Sunday and they're highlighted in bold, even if I set weekdayStart: DateTime.sunday. I would like for example to set the weekend days to Friday & Saturday.

Disable already booked dates

This package has very clean and simple beautiful implementations. i just need the feature to disable the dates which are already booked.

How to disable scrool?

Hello good morning, how do I disable the calendar scrool? I would like to have only one calendar displayed on the screen. If you have an example even better. Thank you very much

Make scrollController optional

We use the calendar inside a sliding sheet with a jumpTo(offset) with the previous scrollController. It's generic to other components and we need to keep the scrollController. Is it possible to make it optional again ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.