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 8577779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:14:09+00:00 2026-06-11T20:14:09+00:00

I want to show a date picker where the user will enter only month

  • 0

I want to show a date picker where the user will enter only month and year of the credit card expiry date.Is there any picker which will show only month and year options?

  • 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-06-11T20:14:11+00:00Added an answer on June 11, 2026 at 8:14 pm

    You probably need to make your own picker. You don’t have to subclass it or anything, though; just use a generic UIPickerView and return appropriate values from your UIPickerViewDelegate/UIPickerViewDataSource methods.

    Or Here is a solution to get the same effect. For using this snippet of code you should replace UIPickerView to CDatePickerViewEx in nib file in “Custom class” of “Indentity inspector”.

    .h file

    #import <UIKit/UIKit.h>
    
    @interface CDatePickerViewEx : UIPickerView <UIPickerViewDelegate, UIPickerViewDataSource> 
    
    @property (nonatomic, strong, readonly) NSDate *date;
    -(void)selectToday;
    
    @end
    

    .m file

    #import "CDatePickerViewEx.h"
    
    
    // Identifiers of components
    
        #define MONTH ( 0 )
        #define YEAR ( 1 )
    
    // Identifies for component views
    
        #define LABEL_TAG 43
    
    
        @interface CDatePickerViewEx()
    
        @property (nonatomic, strong) NSIndexPath *todayIndexPath;
        @property (nonatomic, strong) NSArray *months;
        @property (nonatomic, strong) NSArray *years;
    
        -(NSArray *)nameOfYears;
        -(NSArray *)nameOfMonths;
        -(CGFloat)componentWidth;
    
        -(UILabel *)labelForComponent:(NSInteger)component selected:(BOOL)selected;
        -(NSString *)titleForRow:(NSInteger)row forComponent:(NSInteger)component;
        -(NSIndexPath *)todayPath;
        -(NSInteger)bigRowMonthCount;
        -(NSInteger)bigRowYearCount;
        -(NSString *)currentMonthName;
        -(NSString *)currentYearName;
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to show only day and month and not year in my date
Is there any way in jQuery UI Date Picker to show a day name
Background: I want to show the time and date uptill only 1 week. After
i'm using this control for date picker. i want that when user click on
I want the user to specify their birthday or anniversary date (without year) in
I want then when user select the date from datepicker on textbox it will
I want to show a date string in this format: Jun 27, 2012 .
I have date 2012-04-02 10:01:00 am I want to show this date in with
I am trying to find a date picker that can show dates to select
is there any easy to validate a time field entry against the current date

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.