Code Monkey home page Code Monkey logo

cxdurationpicker's Introduction

Build Status Coverage Status Version Platform License

CXDurationPicker

Custom iOS view for picking a date range

Screenshot

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like CXDurationPicker in your projects. See the CocoaPods homepage for more information.

Podfile

platform :ios, '9.0'
pod 'CXDurationPicker', "~> 0.16.10"

Usage

Colors

Calendar colors can be changed in code by setting the following properties on CXDurationPickerView. Screenshot

Demo Project

There is a demo project which provides an example of interacting with CXDurationPickerView. To run this project please change into the CXDurationPicker project's folder and follow these steps:

% cd CXDurationPickerDemo
% pod install
% open CXDurationPickerDemo.xcworkspace

Collaboration

If you have any feature requests/bugfixes etc. feel free to help out and send a pull request, or create a new issue.

Maintainers

License

Copyright 2015 - 2021 Concur

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

cxdurationpicker's People

Contributors

atastrophic avatar boska avatar hank-liang-sap avatar mlencinas avatar rapuckett avatar

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

Watchers

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

cxdurationpicker's Issues

A Couple of questions

Hi guys,

This is a really great date range calendar. I am a swift developer so I'm not pro at objective-c. Because of that I have few questions about usage.

  • Is there any chance to select only start date on duration mode?
  • Can I change the start day of week? In my country, the start day of week is MONDAY. I need to change it.
  • My last question about appearance; I would like to stick month name on top when scrolling. How can I do that?

Thank you

Spaces between months are not consistent

This cannot be seen in the simulator.

You must run on a device to see it.

Running on my iPhone 5, you can see that December 2015, June 2016 have larger gaps above them.

February 2016 has no gap between its title and the box for Jan 31. Same for August 2016.

Tested 0.9.0 on device, still present
#14 re-opened

Deselect into the range selection.

Thanks for the beautiful project. My requirement is to set a range say 7 th to 25th (that's fulfilled here) but If I want to deselect 12th and 15th it will be de selected and the another entire range will remain selected. Please help how can I fulfil the requirement.

Calendar is showing months in past

I've set allowSelectionsInPast to NO, but when the calendar comes up, I can scroll up through previous months.

It won't allow me to select, which is good, but how can I stop it even showing the previous months?

Found in 0.9.0, wasn't visible in 0.7.0

A couple of questions

This calendar is great, however I was wondering if is it possible to make it scroll horizontally, rather than vertically.

Also, is it possible to change the starting day of the week? As of now it starts from Sunday. I wanted to shift it to Monday, in the days array, but the day is wrong.

Thanks.

Scrolling up and down will cutoff the cell

This is not visible on the simulator. You will need to run on a device to see this.

Running on my iPhone 5, if you scroll down to February 2016, March 2016, April 2016 then slowly scroll back up.

As you scroll up past February 2016 to see the cells for January 2016, you will see that the bottom of the cell for 31 is chopped off.

The same happens when you scroll down moving July 2016 out of view, when you scroll back up, 31 is chopped off.

It only seems to happen when there is a single day remaining at the end of the month.

Tested 0.9.0 on device, still present
#13 re-opened

Check-in and Check-out dates are always in US format

Check-in and Check-out dates are always in US format irrespective of the device regional settings. Tested when changing settings to UK and India. Expected to see dd/mm/yyyy but always shows in US format mm/dd/yyyy

Change Select Range

Hi,

Nice Work!! but could u explain how to use it? i just put the class in a UiView in the interface builder, but i can't seem to change the selected range.

Thanks!

Days of week are not localized

If you switch iPhone to French and use the duration picker, the days of the week are still showing MON, TUE, WED, THU, FRI, SAT & SUN.

Calendar shows January 2015 instead of January 2016

This issue does not occur in simulator, only on device.

Running on my iPhone 5, if I scroll down to December 2015 and keep scrolling down, the next month appears as January 2015.

Tested 0.9.0 on device, still present
#12 re-opened

InvalidStartDateSelected fired incorrectly?

Relates back to original issue #6
"When the control comes up first. Click a new start date, the triangle doesn't slide from Start to End. Click a new start date again and this time it does.

Also, when it does slide over and you select a end date, it doesn't slide back to Start."

Ok, so it can't be repro'd in the demo, only in Jarvis.

However, the reason seems to be that when you select a new start date in the future, it fires invalidStartDateSelected, rather than startDateChanged.

I wonder if the condition that triggers invalidStartDateSelected needs reviewing, so that it doesn't treat a new start date in the future as invalid?

Perhaps we need a new invalid, and we need to treat this situation as a new event?

Calendar loads 6 months ahead

I was trying to implement this library and customize it to my UI. The customization was a charm. But, when running it on my device the CXDurationPickerView component scrolls to Nov 2016 (we are currently in May 2016). I tried using the scrollToStartMonth: method but it was unsuccessful.

The demo works fine, but it seems (comparing both the pod and the demo folder) the library code is not the same as current pod version 0.16.1

Can you fix this?

Thanks!

Picker does not put future date range in focus

Picker does not put future date range in focus

I am in June 2015, running on my iPhone 5.

If I provide the picker with an initial date range of September 1-2, the picker opens showing June 2015. If I scroll down September 1-2 are selected, but the picker does not open with the selected range in view.

Tested on 0.9.0

Re-opening of issue #10

Calendar always defaults to range today->today+2

The calendar has a call to initWithDefaultDuration coded inside an init method. This causes a problem, as it will always draw an initial date range of today->today+2, even though we are calling setStartDate and setEndDate to use today->today+1.

image

This becomes more of a problem when you select a future date range, say May 26 - May 28. Close the VC, then come back in. Our VC passes the date range May 26 - May 28 as the startdate-enddate. The control comes up, draws the default today->today+2, then draws the May 26 - May 28. So we end up with two date ranges appearing.

image

My preference would be to remove any call to initWithDefaultDuration, and make the method public. Either this, or we need to clear any current duration when setStartDate is called. Or, we need to make clearCurrentDuration public.

Switcher date labels need to accomodate more text

Selecting any date August 10-31, Sept 10-30 you will see that the selected date in the CXTabView has ellipses showing. The label needs widening to accommodate longer date strings.
#11 re-opened

Tested with picker 0.9.0 and tabview 0.2.0

Cannot set the whole background transparent

I want to make the whole component background color transparent. But, it still remains white even if I use:

self.picker.backgroundColor = [UIColor clearColor];

Also, I tried to fetch the subviews and make all of them transparent too. It didn't work.

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.