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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:23:27+00:00 2026-06-09T11:23:27+00:00

First, I have an TextField. When user click on it, DatePicker will appear (in

  • 0

First, I have an TextField. When user click on it, DatePicker will appear (in the same textfield’s view). After user choose date, DatePicker should be disappear, and textfield should show selected date.

I have tried this code in ViewDidLoad:

    txtTime.TouchDown += (sender, e) => {
    UIDatePicker picker = new UIDatePicker (new RectangleF (0, 20, this.View.Bounds.Width, 10));  
    picker.Date = DateTime.Now;
    picker.Mode = UIDatePickerMode.Time;
    this.Add(picker);
    txtTime.ResignFirstResponder();             
};

But I have some problem:

  1. Can’t disable keyboard (ResignFirstResponder() doesn’t work)
  2. I don’t know how to handle select date even of DatePicker to set for Textbox
  3. The DatePicker appear without ‘close’ or ‘done’ button, so can’t return to textfield view (could I use Datepicker without actionsheet?).

How can I solve that?

  • 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-09T11:23:29+00:00Added an answer on June 9, 2026 at 11:23 am

    In the book “Developing CSharp Apps for iPhone and iPad using MonoTouch – 2011”, chapter 7 “Standard Controls” you could see example of how to implement picking date.

    Basic idea is to:

    • Put DatePicker on a UIActionSheet (create custom class, which controls DatePicker and UIActionSheet actually);
    • Add label “Choose date, then press OK” and buttons “OK”/”Cancel” to the top side of UIActionSheet’s View;
    • Show UIActionSheet on textField.EditingDidBegin event.

    Screenshot:

    How it looks like

    Sorry for Russian locale settigs.

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

Sidebar

Related Questions

I have a textfield that the user inputs, then I save it with NSKeyedArchiver
I'm trying to have a Textfield lose it's leading zeroes when the user leaves
I have 3 UITexfield, the user can fill in the first two, but the
ok, here is the story... I have 3 textfield for user to select.... [textfield
I have a UIAlertView set up with a textfield like so: //***first set of
I have a popup view (of a calculator) that is presented whenever a textfield
I have added a Button in the View { xtype:'button', id:'when_button_click', text:'Button Click', ui:'alert'
In my view, let's say I have something like this: <%= f.text_field :name_first %>
To access a remote database, I first have to use a program called Shrew
In order to bring up the menu for a DataGridViewComboBoxCell, I first have to

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.