Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Stephens' Visual Basic Programming 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' Visual Basic Programming 24-Hour Trainer by Rod Stephens; ISBN: 978-0-470-94335-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' Visual Basic Programming 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 28th, 2013, 09:43 PM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2012
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Month Calender help

I have a button1 that when clicked, it opens a monthcalendar1 form. I would like to have the user select a date from the calendar and whatever date they selected shows up in the a textbox but in "yyMMdd" format. On some forums I've read, its states that if I want just the date and not the range I need to change the MaxSelectionCount=1 in the properties window and use the "monthcalendar.selectionend" in my code. Unfortunately no example of code was given. I'm not so worried about the date format right now but just getting it into the textbox. Any help greatly appreciated. Running visual studio 2010 in windows 7 if it helps.

Last edited by pooky; February 28th, 2013 at 09:45 PM..
  #2 (permalink)  
Old March 2nd, 2013, 02:56 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

To let the user select a single date, set the control's MaxSelectionCount property to 1. That means they can only select 1 day.

You could also consider using a DateTimePicker control instead. It takes less room and only lets the user select 1 date. It doesn't display a month calendar, though, and sometimes that's useful.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calender Brykneval ASP.NET 4 General Discussion 0 August 11th, 2011 02:47 AM
Converting month name to month number kalyanykk SQL Server 2005 7 August 19th, 2008 10:37 PM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM
calender crmpicco Classic ASP Basics 2 March 23rd, 2005 01:21 PM
Calender gmoney060 Classic ASP Basics 4 August 23rd, 2004 12:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.