How to make weekday names uppercased and what to change to just show 5 weeks in every month in FSCalendar? - fscalendar

I want my calendar's weeknames in uppercase form and also want to show just 5 week, as there can be maximum 31 days, so no need of 6 weeks, just wasting some space. It will be helpful if anyone can show me the right direction?

I know exactly what you mean with 5 weeks month (i had the same problem at first). Fortunately, the library is pretty flexible so all you have to do is set the property placeholderType to .None. In my case, my calendar outlet is called calendarOutlet so the line of code looks like this:
calendarOutlet.placeholderType = .None
As for weeknames you'll have to be more specific than that because in my case the calendar always has shown the weekdays in uppercase (see image below).

Related

Swift Date Picker hide days of the week

I use standard Apple UIDatePicker with inline style. How can I hide the days of the week?
I did not find the method on the Internet
screenshot
Have you tried to change the Mode from Attributes Inspector ? By default the mode is set to Date and Time. You need to change it from there or you can create your own CustomDatePicker to display only the months or only the years.
Take a look to this CustomDatePicker example here:
https://github.com/Anandsan/UICustomDatePicker
Or you can use a UIPickerView to set all the months and another UIPickerView to set the years you want to display and after that you can extract the selected values and to use them in your app.

24h UIDatePicker does not offer 24 hours in certain circumstances

In my app, users can pick a "duration". I am using a UIDatePicker with datePickerMode set to time for this.
In order to pick 0-24h, I set the date picker locale to e.g. NL like explained here.
Because I want to show the picker in a list, I use compact for the preferredDatePickerStyle
In order to make it easier for the user to pick a duration, I set minuteInterval to 5
Now, when using this on a device that has 12h time display in the iOS settings, this causes the expanded date picker to only offer hours from 1-12, instead of 0-23.
Interestingly, this problem does not occur when the device is set to 24h time display or I am using any other value for the minuteInterval (e.g. 10) or I am using a different preferredDatePickerStyle (e.g. inline)
Is this an iOS bug and is there any workaround?

When will gestures to select specific values from DatePickers and ValuePickers become possible with the new UI Testing framework in iOS 9?

Right now, I am able to set accessibility labels and identifiers for different picker wheels in my application so that the recorder can pick up when I tap these picker wheels, and I am able to swipe up and down to modify the values, but I am unsure if there is a way for me to specify an exact value to select in these pickers. I am currently running XCode 7 Beta 5 and here is the following code I currently have:
//Expands the cell with the DatePicker
XCUIApplication().tables.staticTexts["Due Date"].tap()
//Modifies the Month, Day, and Year picker wheels.
XCUIApplication().tables.cells["dueDate"].pickerWheels["August"].swipeUp()
XCUIApplication().tables.cells["dueDate"].pickerWheels["19"].swipeUp()
XCUIApplication().tables.cells["dueDate"].pickerWheels["2015"].swipeUp()
As I mentioned, this code works fine, but I kind of have to guess at what the end result would be based upon the current start date (which is the current date, in our app) instead of being able to set the date to a known value.
Has anybody else been running into this same issue? If so, are there any known work arounds? It seems like the set of gestures that the API can mimic are still fairly limited.
Per this post starting in Beta 6 you should be able to do something like this...
app.datePickers.pickerWheels["2015"].adjustToPickerWheelValue("2005")

How to Change UIDatepicker Components from Day/Month/Year to Year/Month/Day

Whenever we use UIDatePicker as Date Mode. it show as
Where first we have to choose the Day/Month/Year (from left to right)
My requirement is Year/Month/Day (from left to right).
In Apple's documentation they specified that in UIDatePickerModeDate. The DatePicker displays months, days of the month, and years. The exact order of these items depends on the locale setting. An example of this mode is [ June | 18 | 2013 ]. But In device it display as DD/MM/YYYY. See UIDatePicker for more info.
So if you want to do it yourself you could create your own UIPickerView with the values you want.
It might helps you create you own UIPickerView

iOS uidatepicker set time for each day

I want my iPhone app to have a date&time picker with constraints on time 10 AM to 5 PM for all future days. For example,my user should be able to select today with maximum of 5 PM or a future date with time between 10 am and 5 pm.
The minimum and maximum date properties doesnt help me with my requirement. Any possible solution? Thanks in advance :)
UIDatePicker doesn't appear to support a minimum or maximum time, only date.
You will have to either subclass UIDatePicker and create your own, or possibly alert the user when they select something out of your bounds.
A similar question was posted here: Time range on date picker for specific dates iPhone

Resources