Code Monkey home page Code Monkey logo

datepickerdialog-ios-swift's People

Contributors

aj9 avatar akshit5230 avatar benjohnde avatar diogoguimaraes avatar leonluc-dev avatar lfarah avatar madeinqc avatar misteral avatar romanpodymov avatar smaugho avatar soberman avatar viniciussoares avatar voluntadpear avatar yongjing 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datepickerdialog-ios-swift's Issues

Won't work in landscape mode

  • The Picker won't show in landscape mode (#8)
  • If the device is rotated to landscape, the Picker disappears (#10)
  • If in landscape mode and goes back to portrait, Picker also won't show

DatePicker Dialog not showing

Hello Dear,
I am using storyboard. If i set entry point using storyboard then dialog working fine. When i set rootViewController programmatically in AppDelegate, DatePickerDialog not working anymore.

window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.makeKeyAndVisible()

    storyboard = UIStoryboard(name: "Main", bundle: nil)

    let homeViewController = self.storyboard?.instantiateViewControllerWithIdentifier("HomeView") as? HomeViewController
    let userTypeController = self.storyboard?.instantiateViewControllerWithIdentifier("UserTypeView") as? UserTypeController

    if self.window != nil {

        let userDataExist = CommonUserFunction.isUserDataExist() as Bool

        if userDataExist == true {

            let navigationController:UINavigationController = storyboard!.instantiateInitialViewController() as! UINavigationController
            navigationController.viewControllers = [homeViewController!]

            self.window!.rootViewController = navigationController
        }
        else{

            let navigationController:UINavigationController = storyboard!.instantiateInitialViewController() as! UINavigationController
            navigationController.viewControllers = [userTypeController!]

            self.window!.rootViewController = navigationController
        }
    }

please Help...Thanks in advance...

time

How to get time from dialog?
even though mode id Time dialog returning date

Fails to build on Swift 2.3

Hi,

Great project! I have an issue building on Swift 2.3 fails with numerous errors on the DatePickerDialog.swift file. How can I build on Swift 2.3?

how change to my color theme?

I want background black color, font color white
change many views, not working.

DatePickerDialog().show("选择预约日期", doneButtonTitle: "确定", cancelButtonTitle: "取消", datePickerMode: UIDatePickerMode.DateAndTime) {
                (date) -> Void in
                print("选中时间\(date)")
                self.pickedDate = date
                self.tableView.reloadData()
                //self.textField.text = "\(date)"
            }

this work in swift2.1

DatePicker does not dismiss keyboard

I have a simple view that has 2 text fields. The first text field takes normal input via the keyboard, the second textfield is my date field. When I when I tap on the date field when the keyboard is already showing the date picker dialogbox shows but the keyboard is not dismissed. I've tried to dismiss the keyboard via "view.endEditing(true)" and also firstTextField.resignFirstResponder() but nothing works. On some devices the keyboard covers the date picker dialogbox which leaves the user in a state where they have to force quit the app.

Unable to use

I get this error when i do import "cannot load underlying module for datepickerdialog". thanks in advance

Framework file name

After doing carthage update the framewrok file name is:

DatePickerDialogFramework.framework

Instead of:
DatePickerDialog.framework

In the README.mdown documentation:
You are assuming it to be: DatePickerDialog.framework as in: $(SRCROOT)/Carthage/Build/iOS/DatePickerDialog.framework

DatePickerDialog gets dismissed on raising an iOS 10 device.

This could simply be an iOS 10 bug but running an app on an iPhone 6S running iOS 10 device causes the DatePickerDialog to dismiss (since the close() function gets called) itself when the user raises their iPhone or sets the iPhone down. (Similar motions to the raise-to-wake gesture on iPhone 6S/+ devices)

Steps to reproduce:

  • Launch an app and open the DatePickerDialog view.
  • Set the device on a table and pick it up to face-height.
  • The DatePickerDialog view disappears

Reason for the bug and a temporary fix:

The deviceOrientationDidChange method is subscribed to the UIDeviceOrientationDidChange event and calls close() when the event is triggered. iOS 10 is apparently providing the device a UIDeviceOrientationDidChange event on a 'raise' gesture.
A temporary fix--for apps that only support portrait mode-- is to comment the call to close()

How to disable a particular date in DatePickerDialog ?

Hey all,

i'm working on a datePicker for booking system.
I need to disable some dates because there aren't available for booking (restaurant closed on 28/11/2016 for example)
is there any way to do it ?

Thank You !

'M_PI' is deprecated: Please use 'Double.pi' or '.pi'

Got this warning after XCode 8.3.1 Update

'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.

let rotation = CATransform3DMakeRotation((CGFloat)(-startRotation + M_PI * 270 / 180), 0, 0, 0)

Dialog doesn't appear (XCode 7.3)

Dialog doesn't appear on my project.

Dialog view's frame seems to be correct:
(0.0, 0.0, 320.0, 568.0)

Also I tried to bring subview front by adding this line in the func show: method:
UIApplication.sharedApplication().windows.first!.bringSubviewToFront(self)

I'm using a navigation view controller under a tab bar controller. When debugging nothing seems to be wrong. I think it's only a visibility problem.

Any idea?

Deprecated warning in xcode 8.3

..../Pods/DatePickerDialog/Sources/DatePickerDialog.swift:107:77: 'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.

Format date

How can I format de return value? For example "dd-mm-YYYY"

Thanks!

Tests

As discussed in #33, we should have tests for this library

DatePickerDialog don't show when setting entry point programmatically

Hello everybody!

I have a big problem and hope one of you can help me.
When I open my App the first time, with the entry point from the storyboard, everything works fine. But when I open it the second time, where I set the entry point trough the AppDelegate class the dialog don't appear on the screen. I've seen a issue where someone had a similar problem, but there was no solution for this.

Thanks in advance!

Support ios9 Multitasking

In SplitView Mode on iOS9

UIScreen.mainScreen().bounds delivers the size of the screen. But we want the size of the app.

You can use UIScreen.mainScreen().applicationFrame instead of UIScreen.mainScreen().bounds

btw: i think you forgot to add a listener to the cancel button ;-)

self.cancelButton.addTarget(self, action: "buttonTapped:", forControlEvents: UIControlEvents.TouchUpInside)

best regards
Alex

compile error on xCode9

I am getting this error - Module compiled with Swift 3.1 cannot be imported in Swift 4.0
I used pod with master branch

dialog not centered in landscape mode

thanks for fixing the orientation crash. i tested your example project in the ios simulator (iPhone6, iPad Air 2). In landscape mode the dialog is not centered.

best regards
Alex

Allow custom features

Please allow the user to have custom features. Like I want the background to have a blur when the picker view is presented, the pickerview's background to be a black instead of the default gray, and the pickerview's text's to be white instead of the default black!

How can I delete date? Or how can I set an empty date?

My problem is simple. The user click on DatePickerDialog, the modal shows up. But now he realized that he don't want to set up date. Is there a way how to set up a blank date? Maybe a button with erased function, or empty date after click on cancel.

Thanks in advance for help.

Swift 3 issue

There's any plan to support swift3??

Thanks to your nice work, I use it very well but I have to upgrade swift version....

80 line error

My first controller containes button with action on open DatePickerDialog. When i present another controller and than present back my first controller, it said fatal error on line 80. appdelegate.window == nil. What's wrong?

Example project seems to be broken

I would rather write some tests than correcting the example project.
If one has the use case to implement a date picker dialog, the readme contains enough information of how to use this project (which is pretty simple). So I recommend to just leave it out.

how to set dateFormatter?

I have tried many ways, but cannot get the dateFormatter to work. Can someone show me how to set this up?

Orientation Change forces Crash

Hi, thanks for this tiny picker.

i wondered why my app was crashing without any messages in the log. after a while i recognized that it crashed after a orientation change. i think the NSNofiticationCenter Observer needs to be removed when the View dissapears.. As i my app is only for portrait mode i just removed the Observer.

best regards
Alex

setting datepicker

i want set minuteInterval.
but i don't access datePicker
datePicer is private property.

24H format?

Hello,

Can you please point out how to enable 24H format instead of using AM and PM for the time?

Thank you.

First Responder.. / Resign

When the textField is tapped once, it works fine, but after canceling or selecting a date, if I want to modify the date and tap on the textField, the picker does not come up again. I have to select a different textField in order for it to work 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.