Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Date help

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    29
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Date help

    I have a report that is written in java. When the user clicks on the report button another form appears with a jdatechooser. The report is a weekly report so it runs Monday through Sunday to go along with the payperiod. Now the report works fine however, if the user selects a date that is not on a Monday it shifts the report. I was wondering if I could have a combobox with selected weeks as the selection options. So the selection would say, Monday, July 18 - Sunday, July 24. I would also like to be able to restrict the date selection to only 2 weeks ahead of present time. If anyone could help me it would be much appreciated.

    Thanks


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,462
    My Mood
    Hungover
    Thanks
    144
    Thanked 639 Times in 547 Posts

    Default Re: Date help

    What's your question? If your question is "is something possible" the answer is "probably". If your question is "how do I do something", then you'll want to provide an SSCCE demonstrating what you've tried and where you're stuck.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    29
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Re: Date help

    I am wondering how can I add week selections to a combo box that the user can select. That way the report accurately show the data. This report shows all the employees that are on leave and vacation.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,462
    My Mood
    Hungover
    Thanks
    144
    Thanked 639 Times in 547 Posts
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    29
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Re: Date help

    I am not really sure how to go about getting the weeks. I suppose my question is more how to use the calendar class to get a list a week ranges to add to the combobox. Not so much the combobox itself.

Similar Threads

  1. same date should entered in another date field
    By shashib09 in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: July 14th, 2011, 08:42 AM
  2. Date problem
    By java_wannabe in forum Java Theory & Questions
    Replies: 7
    Last Post: April 22nd, 2011, 09:25 AM
  3. Calendar date
    By joshft91 in forum Object Oriented Programming
    Replies: 11
    Last Post: November 6th, 2010, 02:47 AM
  4. sql date problem
    By realosso in forum JDBC & Databases
    Replies: 2
    Last Post: June 3rd, 2010, 08:32 AM
  5. How to set expiry date for cms?
    By khodam in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: December 4th, 2009, 12:15 PM

Tags for this Thread