Results 1 to 5 of 5

Thread: Date Picker

  1. #1
    Schillers is offline Member
    Join Date
    Dec 2012
    Posts
    5
    Rep Power
    0

    Default Date Picker

    Hi guys,

    I need to create a text box in Java that only allows the user to input a date in the format ("dd/MM/yyyy"). How can I make this happen using a the tools available on the netbeans SDK?

    Thanks,
    James

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: Date Picker

    What technology are you using? Is this a swing application, a web application or anything else?

  3. #3
    Schillers is offline Member
    Join Date
    Dec 2012
    Posts
    5
    Rep Power
    0

    Default Re: Date Picker

    Using netbeans. I think it's swing?

  4. #4
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default Re: Date Picker

    You will just need to validate the user's input after they type it. Just read what they typed into the field, you can validate it with a regular expression, and then either toss an error or accept it.

  5. #5
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: Date Picker

    Using the Swing library you can take a look at JSpinner component. This component allows you to get input of date and time values.

Similar Threads

  1. DateTime picker problem
    By darrenstyles88 in forum New To Java
    Replies: 1
    Last Post: 09-07-2012, 10:13 AM
  2. [Help] date picker problem!
    By buihoang in forum AWT / Swing
    Replies: 0
    Last Post: 05-19-2011, 09:51 AM
  3. Date time picker
    By Dipke in forum New To Java
    Replies: 4
    Last Post: 10-20-2010, 12:52 PM
  4. Date Picker in swt
    By ashin in forum SWT / JFace
    Replies: 4
    Last Post: 12-21-2009, 07:12 PM
  5. Date Picker
    By kishan in forum Advanced Java
    Replies: 4
    Last Post: 08-31-2009, 03:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •