Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4068218
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:20:53+00:00 2026-05-20T16:20:53+00:00

I am creating my own UIPickerview for dates as I need only Months and

  • 0

I am creating my own UIPickerview for dates as I need only Months and Days and do not want years, so I cannot use UIDatePicker. When different months are selected I cannot seem to replicate the way UIDatepicker gray’s out the unavailable days.
For example: when November is selected days 1-30 are selectable but 31 is not when using the UIDatepicker. Does anyone know how to replicate this and make certain row grayed out and unselectable.
Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:20:54+00:00Added an answer on May 20, 2026 at 4:20 pm

    I realize you may have already figured this out, but I wanted to add some further information for those looking for the same answer.

    An alternative route that you might try is via:

    -(void)pickerView:(UIPickerView  *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
    

    In that method, you would check to see whether or not the particular components in the pickerView had a valid selection. If it didn’t then reset the particular component (column – why didn’t they just call it that) to a valid row with:

    [pickerView selectRow:validRow inComponent:component animated:YES];
    

    This will give the effect that if the user chooses a particular invalid row, it will scroll back up (or down) to a valid one.

    Additionally, you could change the dataset for the component in question and then do a:

    [pickerView reloadAllComponents];
    

    Just keep in mind that when you set up the picker, you’ll have to do this validation on the first run so ensure that no invalid datasets are in the pickerView by default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating my own templatesystem because I only need a few little operations to
Is there any resource or book for creating own linux distro.Only good resource i
I'm creating my own script using the CodeIgniter MVC framework. Now, i want users
I'm creating my own API for a game-statistics system (in PHP). And I want
I need a PickerView, that behaves like a normal UIPickerView, but only shows one
I am creating my own custom object, and I am wondering if I need
I am creating my own blog engine in MVC3 and I don´t want to
I'm creating my own UserControl and I have two different DataTemplates under the UserControl.Resources
I am creating my own file tagging system for an application and have not
I'm creating my own little task system in Ruby on Rails, but I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.