savvisingh / DateRangePicker

Date Range Picker is a Calendar Picker View to show a Customized Date Range Picker with improved UI and functionality to add subtitles to the dates
Apache License 2.0
784 stars 160 forks source link

Added subtitles #50

Closed theapache64 closed 5 years ago

theapache64 commented 5 years ago

To show subtitles below the date, (useful for ticket booking system to show prices for specific type, such as flight price, bus price etc. of that specific day) I've added a builder method to FluentInitializer.

Example

calendar.init() 
...
.withSubTitles(getSubTitles())
...

private ArrayList<SubTitle> getSubTitles() {
        final ArrayList<SubTitle> subTitles = new ArrayList<>();
        final Calendar tmrw = Calendar.getInstance();
        tmrw.add(Calendar.DAY_OF_MONTH, 1);
        subTitles.add(new SubTitle(tmrw.getTime(), "₹1000"));
        return subTitles;
}

Output

image

savvisingh commented 5 years ago

Thanks for this awesome feature, will review it this coming weekend

sebastian989 commented 5 years ago

I think it's a wonderful feature... @savvisingh, Is there any news about this PR?.

Thanks in advance.

savvisingh commented 5 years ago

Hi @theapache64, Can you please remove your .gradle and .idea folders from the repo, its giving conflicts. Try using my .gitignore from master

theapache64 commented 5 years ago

Sure.

On Thu, 2 May, 2019, 2:21 PM Sarabjeet Singh <notifications@github.com wrote:

Hi @theapache64 https://github.com/theapache64, Can you please remove your .gradle and .idea folders from the repo, its giving conflicts. Try using my .gitignore from master

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/savvisingh/DateRangePicker/pull/50#issuecomment-488595996, or mute the thread https://github.com/notifications/unsubscribe-auth/ACJ23R7SP5INLB37J6Y6OMTPTKTSVANCNFSM4G4BFWPQ .

theapache64 commented 5 years ago

@savvisingh I've updated the my .gitignore. Sorry for the mistake.

savvisingh commented 5 years ago

Check the latest version of the lib I have published your PR in it. And Thanks for such a cool feature

theapache64 commented 5 years ago

Hey,

I just signed the petition "Prime Minister of India Shri Narendra Modi: Amendment in wildlife protection act to curb poaching and killing of endengered animals." and wanted to see if you could help by adding your name.

Our goal is to reach 50,000 signatures and we need more support. You can read more and sign the petition here:

http://chng.it/Z8R2rCH5bD

Thanks! Mohammed