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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:52:18+00:00 2026-06-14T03:52:18+00:00

Getting the DatePicker to automatically goto NSUserDefault saved variable.. Any ideas? I can select

  • 0

Getting the DatePicker to automatically goto NSUserDefault saved variable..
Any ideas?

I can select a date and time.
I can save it
I can quit the app then go back in and it reads the data back in correctly to a label..
then when i goto the DatePicker it defaults to Today’s date and time and automatically replaces the label and the string.

  • 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-14T03:52:19+00:00Added an answer on June 14, 2026 at 3:52 am

    After you have created your created your UIDatePicker, you can set the date property.

    // We assume you have a UIDatePicker object called 'datePicker' 
    // and saved the date to the NSUserDefaults with the key 'pickedDate'.
    
    NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
    NSDate *pickedDate = [prefs getObjectForKey:@"pickedDate"];
    [datepicker setDate:pickedDate animated:NO];
    

    Afterwards, show the date picker as you would normally.

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

Sidebar

Related Questions

Toast.makeText(getBaseContext(), Date selected: + datePicker.getMonth()+1+ /+ datePicker.getDayOfMonth() + /+ datePicker.getYear() +\n + Time Slected:
I've added the detaultDate to my datepicker, it is getting the default date from
I am getting date from datepicker $(#dt).datepicker({ dateFormat: 'MM dd yy' }); now, I
I am using jQuery DatePicker to select from date and to date. when I
i am working on a project where i am getting date value from date-picker
hvaing problems getting datepicker to work, not quite sure why. <link rel=stylesheet href=styles/style.css> <link
I am getting this value from DatePicker var datepickr = 'Jun-29-2011'; I want to
http://jsfiddle.net/s6Umb/ I'm getting this strange behavior where when I create a datepicker, there appears
I have the two following datepicker objects but I can't get what I want
Friends I am getting two inputs from the user 1.InitDate from DatePicker 2.Difference in

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.