Closed karalarbaris closed 8 years ago
Hi, you could implement the protocol after setting delegate to disable dates.
WWCalendarTimeSelectorShouldSelectDate(selector: WWCalendarTimeSelector, date: NSDate) -> Bool
Thank you @weilsonwonder :)
@weilsonwonder @karabar Hey guys, could you explain me how use this method in swift 2? Thanks.
@weilsonwonder @karabar I found it! func WWCalendarTimeSelectorShouldSelectDate(selector: WWCalendarTimeSelector, date: NSDate) -> Bool { if date.timeIntervalSinceNow.isSignMinus { //myDate is earlier than Now (date and time) return false } else { //myDate is equal or after than Now (date and time) return true } }
How to change color and Disable of past time i.e Hour and minutes.. any help.
hey @RnyG i set your code https://github.com/weilsonwonder/WWCalendarTimeSelector/issues/10#issuecomment-260678855 its does't work for me can you share me how to set this code, what is isSignMinus facing error how to call this function and where i set that ? swift 4
Hi @Mitesh-Mewada,
Do try this instead:
func WWCalendarTimeSelectorShouldSelectDate(_ selector: WWCalendarTimeSelector, date: Date) -> Bool {
if date.timeIntervalSinceNow.isLess(than: 0) {
return false
} else {
return true
}
}
Hello, Is it possible to select only certain date ranges? In my case I don't want users to be able to select past dates. Thank you.