I want a date picker like this one, with the month name in short format:
But this is what I get:
This has the full month name, which is not what I want.
I set date picker mode like this:
mydatepicker.datepickermode = datepickermode.date
but it's not working.
Embedded datePicker is not very flexible to adjust. The way to solve your issue is to create your own picker by using UIPickerView. You need to create a picker with 3 components and configure it depending on your wishes. But this way is a little bit annoying, because you need to keep in mind, that every month has it's own number of days. And don't forget also about 29th of February.
Related
When selecting a range for two months start date highlighted for the dates outside month which doesnt look correct. I tried to change css classes but cannot achieve what I want. I know there is a class for days outside month but overriding it doesnt help.
Based on the weekday, I want the correct day to light up.
Screenshot of what I'm trying to accomplish
Use the following formula in the conditional formatting tab:
=IF(WEEKDAY(TODAY(),2)=1,"Monday",IF(WEEKDAY(TODAY(),2)=2,"Tuesday",IF(WEEKDAY(TODAY(),2)=3,"Wednesday",IF(WEEKDAY(TODAY(),2)=4,"Thursday",IF(WEEKDAY(TODAY(),2)=5,"Friday",IF(WEEKDAY(TODAY(),2)=6,"Saturday",IF(WEEKDAY(TODAY(),2)=7,"Sunday",)))))))
Please use Text contains as the option (you're also free to use Text is exactly option as well):
Just Making Calendar app which i have the same requirement as IOS calendar. In that All Day toggle Changes To Different Date Formatting And DatePicker Style is also different. How can i deal with that?.
Use NSDateFormatter and when user change the toggle update format of date using Date formatter and load new format in Picker.
you have option to create another picker otherwise you have to define condition on the picker delegate to show the new date format or your required format .
when you first time open the picker than the content would load on to the picker may be there is a chance when you pass the command to change format than the picker is still showing previous content than you need to reload the picker content to update the picker content value and to show the updated format type content.
may this could help you.
I have a date picker that is set to not allow users to pick future dates. It's maximum date is set for the current time on viewDidLoad.
dateDatePicker.maximumDate = NSDate()
But I've been noticing a bug. Today until midday the maximum date was yesterdays date. But now, after midday it is showing todays date.
The way I implemented it: The date picker is shown and hidden with alpha when user wants to use it. So I am setting the maximum date not every time the picker is shown but once it loads the view it is in.
So I am not sure if this is a bug?
Is it has to do with timezones?
Or has to do with the fact that I am only calling dateDatePicker.maximumDate once when they view loaded and that could have happened days ago?
Or if I should reset the maximumDate every time I show the datePicker?
Yes, you should almost certainly set the maximum date each time you show the date picker.
If you set the maximum date on a previous day and then never updated it nor closed the view controller the it wouldn't change.
Set it in viewWillAppear, not viewDidLoad.
If that doesn't work, use NSCalendar and NSDateComponents to build an NSDate which is 23:59 on the current date (fetch the MM/DD/YYYY from the current date as date components, then manually set the time to 23:59. That should work.
Does anyone uses this calendar ? is there any way to remove first day selection from it? I want to put an animation(show/hide) on Calendar frame when date is changed, but this event also fires when month is changing.
solved, just remove self.selectedTile = [frontMonthView firstTileOfMonth]; from slide method on KalGridView file