Newbie question about setting the date of a UIDatePicker

I created a UIDatePicker in my view and called it targetDate.
If I don't set targetDate's date property, the UIDatePicker shows up by default with a date of November 30, 0002.
So, when the view loads, I did this:
NSDate *today = [NSDate date];
targetDate.date = today;
(Note: in the above expression, the square brackets around "NSDate date" don't show up and are turning the expression into a link instead.)
After doing that, when the view loads the UIDatePicker object initially shows the correct month and date, but it shows 0001 as the year.
So my question is, why doesn't this set the correct year?
In the Interface Builder the UIDatePicker's minimum and maximum dates are set from 1/1/0001 to 1/1/4001. I don't know if that has anything to do with the problem. I assumed that was just setting the allowed range for picking.
I don't know what the "Date" setting field in the IB above the minimum date field is supposed to be for either.
Anyway, am I not setting the date property correctly?
Thanks,
doug
Message was edited by: Doug Lerner2

Instead of setting the .date property when the view loads I ended setting it when the UIDatePicker is displayed and the date setting works ok now.
By the by, if you have very early dates set, like January 1, 0001, the dates of the months are off by a few days. I guess that has to do with the whatever happened like 1000 years ago when they made a big adjustment to the calendars.
doug

Similar Messages

  • Yet another question about setting the size of a JTextField

    Hello,
    yep, I already looked at the other posts & the API.
    I have tried the following (& other code) to try to set the width of the display. Nothing works so far.
            percent_CO2 = new JTextField();  
            percent_CO2.setColumns(8);
            percent_CO2.setToolTipText("The % Carbon Dioxide relates to ...");
            percent_CO2.setPreferredSize(new Dimension(10,20));
            percent_CO2.setMaximumSize  (new Dimension(10,20));        This is one of several JTextField's on a Jpanel defined as :
    jcommonCharPanel.setLayout( new GridLayout(8, 2, 2, 4) );
    //8 rows, 2 columns, vertical & horizontal gaps of 2 & 4Any ideas why it is so difficult to set the size of the JTextField?
    Should I try to limit the size of the JPanel instead?
    thanks,
    -- HSC --

    http://forum.java.sun.com/thread.jsp?forum=54&thread=379656

  • Newbie question about setting up iTunes to sync across multiple computers

    Hi,
    Right now I am using iTunes primarily for listening to streaming radio. However in about 2-3 weeks after I move, I am considering importing all my CDs into iTunes.
    So my question is this. What can I do before I start that will make my life easier for syncing my iTunes across multiple computers.
    I don't expect the computers to connect to each via internet but I do have a 4 GB flash disk and 230 GB firewire drive that could be used. And since one of the computers is MacBook Pro, I could use it in target mode I think.
    Thanks.

    Authorization only applies to computers. When you update a device any protected content on the device for which the library is not authorised will be removed. Otherwise no attempt is made to remove content that was added by a now deauthorised library.
    There is a separate scheme permitting up to 10 devices (computers, iPhones, iPad or iPod touches) to be registered for automatic downloads of your purchases with a different mechanism for deregistering devices.
    Once you have a file on your computer you can physically copy it to any other computer in the same way that you would copy any other file like a Word document, put it on a disk, email it if not too large, burn it to DVD, stick it on an external hard drive or move it over a network. You can use Get Info. To tell you where it is now and you can drop it into the library at the other end.
    The user tip shows how to backup the whole library and then update that backup efficiently. Such a backup to a portable drive also provides a possible tool for transporting any content to another computer.
    tt2

  • Question about setting the background from an image over the internet.

    Hello ,
    If I want the background of my panel to be set from an image over the internet directly do I just add that URL right away like this :
    protected final static String imagePath = "http://www.engr.wisc.edu/2010/background.jpg";
       icon = new ImageIcon(AuthScreen.imagePath);
            JPanel panel = new JPanel(){
                protected void paintComponent(Graphics g)
              Dimension d = getSize();
              g.drawImage(icon.getImage(), 0, 0, d.width, d.height, null);
              super.paintComponent(g);
              };instead of this :
    protected final static String imagePath = "d:\\javaapps\\bg.jpg";cuz I did that but it isnt working .
    Thanks.

    I don't see how, try it out:
    import java.awt.*;
    import java.awt.image.*;
    import java.net.URL;
    import javax.swing.*;
    import javax.imageio.*;
    public class ForumJunk{
      ForumJunk(){
        JFrame f = new JFrame("Forum Junk");
        JPanel p = new MyJPanel();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.add(p);
        f.pack();
        f.setVisible(true);
      public static void main(String[] args) {
        new ForumJunk();
      class MyJPanel extends JPanel{
        BufferedImage bi = null;
        MyJPanel(){
          try{
            bi = ImageIO.read(new URL("http://www.kodiakfishingbc.com/Editor/assets/chris03resize.jpg"));
            this.setPreferredSize(new Dimension(bi.getWidth(), bi.getHeight()));
          }catch(java.io.IOException e){
            System.out.println(e.toString());
        public void paintComponent(Graphics g){
    //      super.paintComponent(g);
          ((Graphics2D)g).setBackground(Color.green);
          g.clearRect(0, 0, bi.getWidth(), bi.getHeight());
          g.drawImage(bi,0, 0, this);
          super.paintComponent(g);
    }

  • Newbie question about setting up a wireless USB device as a router.

    Hi. I have this Nintendo Wi-Fi USB Connector, which used to be very useful for getting my DS and Wii online (I don't have a wireless router.)
    By using some modified drivers from Buffalo I think, I eventually manage to install it as an ordinary wireless device and later set it up as an all-purpose wi-fi router device. I want to do exactly this in Arch if possible.
    As far as I know, there are no real drivers for this device, but I tried some, and got stuck later on.
    I basically want to simply be able to use my laptop, PS3, Wii and DS on it. Nothing fancy, and no encryption, as I only use it when necessary.
    After plugging the device in the USB, I ran
    $ hwdetect --show-net
    NET : forcedeth ppp_generic slhc mac80211 rfkill rt2500usb rt2x00lib rt2x00usb cfg80211
    I looked like it's was quite ordinary actually. So I tried modprobing rt2500usb (should I modprobe the 2 others too?).
    Surprise, surprise! I haven't edited my /etc/rc.conf at all yet.
    $ iwconfig
    lo no wireless extensions.
    eth0 no wireless extensions.
    wmaster0 no wireless extensions.
    wlan0 IEEE 802.11g ESSID:""
    Mode:Managed Channel:0 Access Point: Not-Associated
    Tx-Power=0 dBm
    Retry min limit:7 RTS thr:off Fragment thr=2352 B
    Link Quality:0 Signal level:0 Noise level:0
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0
    Well, at least it detected my wlan. I haven't been able to test if I can actually get online with this thing as there is no network to try on around here.
    So, where do I go from here? The KISS way, if you know what I mean, hehehe
    - Thanks in advance.
    This is my ifconfig -a if useful:
    eth0 Link encap:Ethernet HWaddr 00:1D:60:87:18:D5
    inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0
    inet6 addr: fe80::21d:60ff:fe87:18d5/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2783 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2272 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:2401773 (2.2 Mb) TX bytes:450333 (439.7 Kb)
    Interrupt:23 Base address:0x6000
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:4 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:280 (280.0 b) TX bytes:280 (280.0 b)
    wlan0 Link encap:Ethernet HWaddr 00:0D:0B:C3:18:F2
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    wmaster0 Link encap:UNSPEC HWaddr 00-0D-0B-C3-18-F2-00-00-00-00-00-00-00-00-00-00
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    Checked around, and I need master mode to be able to do this, however, the drivers I have don't support it :\ Any way to get better drivers somehow?:p
    Last edited by Themaister (2008-08-08 06:41:30)

    Thank you. Got a bit further, but probably not in the right direction  : [
    Figured out that the WFC uses the rt2570 chipset (according to wikipedia), which I downloaded from the link you gave. Installed it, and had to blacklist the other ralink-modules that were present for it to work.
    Now, my iwconfig looks like this:
    lo no wireless extensions.
    eth0 no wireless extensions.
    rausb0 RT2500USB WLAN ESSID:"" Nickname:""
    Mode:Monitor Frequency=2.412 GHz Bit Rate=11 Mb/s
    RTS thr:off Fragment thr:off
    Link Quality=0/100 Signal level:-120 dBm Noise level:-82 dBm
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0
    Well, it apperaently did something.
    By looking at the lsmod it only shows up the rt2570.
    Well, sudo iwconfig rausb0 mode master returns the same error I had ... :[
    Does this mean I'm screwed? xD
    EDIT: The forums on that site suggested that the master mode was disabled in the legacy drivers (and the other drivers for that matter) :[
    Well, dual boot here we go
    Last edited by Themaister (2008-08-10 19:48:36)

  • Question about Setting Window Title/the use of AVWindowSetTitle()

    Hi everyone,
    I have a question about setting the title of the window in which the Acrobat viewer normally opens a PDF file.  The documentation states that AVWindowSetTitle() cannot be used in this case.  However, using it has worked with versions of Acrobat/Reader up until and including version 8.
    Everything breaks down starting with Acrobat 9.
    According to the documentation I am supposed to do the following: "To set the title of a window in which the Acrobat viewer opens a PDF file, you must replace AVDocOpenFromASFileWithParams() and pass the window title in tempTitle."
    Unfortunately, there are 2 problems I have with this approach:
         I do need to be able to change the document title on document Save, not only on document Open
         I do not know what AVDocOpenFromASFileWithParams() implementation has to look like if I have to replace it using HFTReplaceEntry().
    Is there a sample customized implementation of AVDocOpenFromASFileWithParams() somewhere that I could take a look at?
    Is there a way to change a document Title inside Acrobat/Reader window after a Save operation?
    Thanks a million,
      Lana2010K

         I am sorry.  I don't know how you tested this and came to conclusion that this works correctly in Acrobat X.
         I just tested our Acrobat plug-in with a trial version of Acrobat X and this did not work.
         When we open a file in Acrobat (doing it ourselves in the plug-in by adding another specialized open) we set the window title to something different from the default file name.  Then if a file gets edited and saved (File->Save), the window title gets reset to the file name. In the PDDocDidSave callback we call AVWindowSetTitle() to set it back to a more descriptive window title we need.  This has worked up until and including Acrobat 8, but does not work in either version 9.0 or 10.0.
         Also, I just modified the plug-in code to always change the Window Title of every document (even if opened through native File->Open) on document Save.  It does not work.
         Please help,
              Lana2010K

  • I wont to fix my old id account my email is  and when you whant to reset the password i dont recieve any email from apple id and when you answer question about your birth date it says not file is found.

    When i try and reset my id account it says it has been blocked for security reason. When you answer question about your birth date no souch record found and when i resset it by email io dont recieve any email from apple id reseat password. can anyone hep me ?
    <Email Edited by Host>

    Security questions:
    https://discussions.apple.com/docs/DOC-4551
    http://support.apple.com/kb/HT5312

  • Question about Rescheduling Start Date of a Task

    Question about Rescheduling Start Date of a Task
    I'm trying to determine whether the 'Reschedule' action is appropriate to my situation...
    I have a service that consists of 4 tasks.  The first 3 tasks will be completed immediately and then the request's 4th task will sit in a queue for about a month so that all of these requests can be grouped together and fulfilled during a few overnight work sessions.
    While the 4th task is waiting to be fulfilled, the technician will be contacting the requestor to schedule the work to be done sometime during a 3 day window.  The technician needs to specify which of the 3 days each request will be worked on.  I'm not sure if I should store the date in a service form field or have the technician reschedule the task so that the start date of the task is set to one of the 3 days.  If I use the reschedule feature, are there any downsides?
    The advantage of using the reschedule feature is that the scheduled start date can be displayed in ServiceManager's task list and can therefore be sorted on and queried.  This wouldn't be possible if I stored the date in a dictionary field on the service form.  In that case, I'd have to use custom reports to group the tasks by start date.
    Please let me know your thoughts...
    Thanks,
    Scott

    This strikes me as a very good use of this feature, since your need to to have the date for this task rescheduled/reflected in ServiceManager. This is the specific effect of using this feature.
    For the benefit of others reading this post, remember: this rescheduled date will not change the due date for the service.

  • Question about setting Rows to "All" for defualt Interactive Report

    I have a default report with 2 user requirements that I have some questions about.
    1. The report in the data sould be 90 days old.
    2. The report show "All" rows.
    First to set the date I have this page process:
    apex_util.ir_clear(p_page_id => 2);
    apex_util.ir_filter(p_page_id=>2,
    p_report_column=>'REQUISITION_DATE',
    p_operator_abbr=>'GTE',
    p_filter_value=>SYSDATE - 90);
    I also set the rows to "All" and save the report to be the default. However I think when the "apex_util.ir_clear(p_page_id => 2)" is executed it clears someting and my report opens with rows set to "15".
    Any ideas on this or even a better way to do it?

    the following link may help...
    It says that the ir_clear "Clears any report filters including default filters"
    apex_util.ir_* documentation - where to find them?
    Gus..

  • Trying to programmatically set the data-source for a Crystal reports report.

    I've got the following existing procedure that I need to add to in order to programmatically set the data-source (server, database, username, and password) for a Crystal reports report.
     I added the connectionInfo parts, but can’t figure out how to attach this to the existing
    this._report object.
    This is currently getting the connection data from the report file, but I now need to populate this connection data from a 'config.xml' text file.
    Am I trying to do this all wrong?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using CrystalDecisions.CrystalReports.Engine;
    using WGS.Reports.Reports;
    using CrystalDecisions.Shared;
    using WGS.Reports.Forms;
    namespace WGS.Reports
    public class ReportService
    ReportClass _report;
    ParameterFields paramFields;
    ConnectionInfo connectionInfo; // <- I added this
    public ReportService()
    public void DisplayReport(string reportName, int allocationNo)
    if (reportName.ToLower() == "allocationexceptions")
    this._report = new AllocationExceptions();
    PrepareConnection(); // <- I added this
    PrepareAllocationExceptionReport(allocationNo);
    this.DisplayReport();
    private void PrepareConnection() // <- I added this
    //test - these will come from the config.xml file
    this.connectionInfo = new ConnectionInfo();
    this.connectionInfo.ServerName = "testserv\\test";
    this.connectionInfo.DatabaseName = "testdb";
    this.connectionInfo.UserID = "testuser";
    this.connectionInfo.Password = "test";
    this.connectionInfo.Type = ConnectionInfoType.SQL;
    private void PrepareAllocationExceptionReport(int allocationNo)
    this.paramFields = new ParameterFields();
    this.paramFields.Clear();
    ParameterField paramField = new ParameterField { ParameterFieldName = "@AllocationNo" };
    ParameterDiscreteValue discreteVal = new ParameterDiscreteValue { Value = allocationNo };
    paramField.CurrentValues.Add(discreteVal);
    paramFields.Add(paramField);
    private void DisplayReport()
    frmReportViewer showReport = new frmReportViewer();
    showReport.ReportViewer.ReportSource = this._report;
    showReport.ReportViewer.ParameterFieldInfo = paramFields;
    showReport.ShowDialog();
    showReport.Dispose();
    Any help would be much appreciated.

    Hi Garry,
    Please post SAP Crystal Reports questions in their own forums here:
    SAP Crystal Reports, version for Visual Studio
    We don't provide support for this control now. Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Question about setting cookies and custom authentication

    I have a question about setting cookies.
    I have two different 'projects' in HTMLDB - we will call them App1 and App2.
    I also have two different connection configurations setup in the DADs.conf file. - we will call them Connect1 and Connect2.
    App1 is setup to use database authentication (no user is specified in the DAD) and uses Connect1. Once the user successfully logs in, we set a username cookie (this is a persistent connection).
    We created a custom authenticatoin scheme for App2 - this scheme checks for the username cookie (set by App1). We would like for App2 to use Connect2 (HTMLDB_PUBLIC_USER is the default user specified and it uses connection pooling).
    Is it possible to set a cookie from App1, Connect1 for App2, Connect2 - then redirect to App2 and pick up that cookie?
    Here is an example of what we are trying to accomplish:
    A user loggs into App1, we set a cookie, and the user is redirected to App2. If the cookie exists, we allow them access to the home page in App2, if no cookie, we redirect back to a 'Login Failed' page in App1. We don't want App2 to use the same database connection as App1 though, we need App2 to use connection pooling.
    Is this possible? OR...Is there a better way to accomplish what we want to do?
    This is an enhancement to an existing app. Our requirements are to use Database Authentication (setup where pass expires after 60 days or so, cannot reuse last 3 passwords, etc.) - which is already setup and being used by other applications in our organization. All of our users have accounts in the database. We don't want users to have a new username/pass - and we don't want to manage a separate group for HTMLDB apps.
    The existing application uses HTMLDB's built in authentication - which uses database username/pass, and it uses connection pooling, but we cannot handle the pass expire stuff in it, unless there's something we're not seeing or understanding - at least that's how our DBA explained it to us.
    Any help with this will be appreciated so much. I can send you the code we have if needed.
    Thanks!

    Same problem here.  I have so many problems with this remote app.  Is there an iTunes API? I would like to write my own remote app that actually works.

  • On the initial set up for apple tv it just sits there trying to set the date and time . it is a wireless setup and the ipaddress and router address is correct . I can't get by this screen

    On the initial set up for apple tv it just sits there trying to set the date and time . it is a wireless setup and the ipaddress and router address is correct . I can't get by this screen. The setting is on automatic and I have picked a city in my time zone yet it still tries to set a time and date but fails.
    thanks

    Make sure router is up to date. Try ethernet to rule out any wifi issues. Reboot ATV and router.

  • How do I programatically set the date and time of my FP-2000 in LabVIEW RT?

    I checked out the following knowledgebase document which has a tool for setting the system time, but I also need to set the date:
    http://zone.ni.com/devzone/explprog.nsf/ 6c163603265406328625682a006ed37d/ 37175dbc3696a1ac86256a850051097d?OpenDoc ument
    How can I do this?
    -Jim

    That is great, Steven. I also found a solution using GetSystemTime and SetSystemTime which are functions in kernel32.dll that get and set the system date-time. This function call worked on the FP-2000 that I have and should work on RT-Embeded systes, as well.
    -Jim
    Attachments:
    GetSystemTime.vi ‏16 KB
    SetSystemTime.vi ‏14 KB

  • How can i set the date time year to my i pod

    how can i set the date time year to my i pod touch

    Hello Theodora,
    You can do this via your iPod's Settings application.
    B-rock

Maybe you are looking for

  • Slow motion lost after sync from mac to iphone

    Hi, I can capture videos in slow motion but those videos play at normal speed once Sync them via iTunes. 1. Capture videos in slow motion. 2. The videos first play in slow motion in the iPhone. There is a time line slider to move the slo-mo effect ba

  • Licenses not showing up as available

    Hi Experts In  our production system i have put some 15 professional licenses and i have assigned only one license to the manager user id.The rest 14 licenses should be available in the components tab of the license administration,but the available n

  • Hooking up to DSL

    FINALLY upgrading from my G3 tower with dialup to a new iMac Duo Core purchased yesterday. My ISP wants to sell me a DSL modem for $99.95. A Westell DMT 36R516. What other options do I have? I did a Google search and found refurbished versions of thi

  • Does ASC 2 remove unnecessary activation objects?

    The release notes for ASC 2 say: "Reduces function overhead by removing unnecessary activation records. " Does this actually happen?  Can someone give a code example that shows this? I've tried the braindead cases where you'd think this would happen

  • User SIMPCDIA has no RFC authorization for function group BBPC

    Hello all, I am working with SRM 7.0 and when I try to list all account values in the corresponding matchcode, I have this error message: User SIMPCDIA has no RFC authorization for function group BBPC User SIMPCDIA is a dialog user created in backend