GithubHelp home page GithubHelp logo

shagiz / almostmaterialdatepicker Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 20.0 572 KB

Date picker made in material design style with some additional spinners

Kotlin 1.48% Java 98.52%
android-library datepicker material-design

almostmaterialdatepicker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

almostmaterialdatepicker's Issues

val

val variable is not imprting

I find the MonthDayLabels is not in the middle

The reason is in the 'drawMonthDayLabels(Canvas canvas)' method of the 'MonthView.java' file:

int dayWidthHalf = (mWidth - mEdgePadding * 2) / (mNumDays * 2.0f);

The 'int' should be replaced by 'float', Because of the loss of precision leading to deviation.

I'm sorry, my English is very bad

Month error

Hey @shagiz you had forgotten to add +1 for getting month
Replaec your method with this

public void notifyOnDateListener() {
if (mCallBack != null) {
mCallBack.onDateSet(DatePickerFragmentDialog.this, mCalendar.get(Calendar.YEAR),
mCalendar.get(Calendar.MONTH)+1, mCalendar.get(Calendar.DAY_OF_MONTH));
}
}

Locale issue

Number in locale("ar") does not appear correctly, the numbers appears as mix of (Arabic and English)

Didn't find class "android.support.v7.widget.RecyclerView"

Tjis is I found when i try to apply u code inside fragment

`DatePickerFragmentDialog dialog = new DatePickerFragmentDialog();

            dialog.setOnDateSetListener(new DatePickerFragmentDialog.OnDateSetListener() {
                @Override
                public void onDateSet(DatePickerFragmentDialog view, int year, int monthOfYear, int dayOfMonth) {
                    myCalendar.set(Calendar.YEAR, year);
                    myCalendar.set(Calendar.MONTH, monthOfYear);
                    myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);

                    updateLabel();
                }
            });
            //dialog.setOkColor(Color.BLACK);
            //dialog.setAccentColor(Color.DKGRAY);
            dialog.show(getFragmentManager(), "123");`

Selecting previous month from spinner crashing the app

Select the minimum day as something like 19-Feb-2019. In months drop down still January is showing for the year 2019, if i select January month app is getting crashed. Below is the error info.

java.lang.IllegalArgumentException: Invalid target position at androidx.recyclerview.widget.RecyclerView$SmoothScroller.start(RecyclerView.java:11534) at androidx.recyclerview.widget.RecyclerView$LayoutManager.startSmoothScroll(RecyclerView.java:8204) at androidx.recyclerview.widget.LinearLayoutManager.smoothScrollToPosition(LinearLayoutManager.java:451) at androidx.recyclerview.widget.RecyclerView.smoothScrollToPosition(RecyclerView.java:1781) at com.shagi.materialdatepicker.date.DayPickerView.scrollToMonth(DayPickerView.java:230) at com.shagi.materialdatepicker.date.DatePickerFragmentDialog$3.onMenuItemClick(DatePickerFragmentDialog.java:912) at android.widget.PopupMenu$1.onMenuItemSelected(PopupMenu.java:105) at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:776) at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148) at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:923) at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:913) at com.android.internal.view.menu.MenuPopup.onItemClick(MenuPopup.java:128) at android.widget.AdapterView.performItemClick(AdapterView.java:318) at android.widget.AbsListView.performItemClick(AbsListView.java:1159) at android.widget.AbsListView$PerformClick.run(AbsListView.java:3136) at android.widget.AbsListView.onTouchUp(AbsListView.java:4064) at android.widget.AbsListView.onTouchEvent(AbsListView.java:3822)

Year dropdown issue in Dark theme mode

When I try to select the year from the year spinner, it is showing dark drop bg with gray year text color in dark theme mode. I could not select what exactly the year is. But in the month drop down it's working well. In a normal theme, it works well.

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.