Solved

URGENT! VB.NET -- Need to get MonthCalendar value for TextBox.Text property

Posted on 2013-01-18
2
2,354 Views
Last Modified: 2013-01-19
Hello everyone,

I need to extract a date value from a MonthCalendar object and set it to the TextBox1.Text property.

Is this possible?

This is how I want to utilize the MonthCalendar:
=======================================

TextBox1.Text = MonthCalendar1._______________

I often use a DateTimePicker in these cases, but the client wants the MonthCalendar instead.
=====================================================================

TextBox1.Text = DateTimePicker1.Value.ToString("mm/DD/YYYY")


Thanks!
0
Comment
Question by:eq2006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Assisted Solution

by:terencino
terencino earned 250 total points
ID: 38795748
Hi what about
MonthCalendar1.SelectionStart.ToShortDateString

Open in new window

0
 
LVL 10

Accepted Solution

by:
Monica P earned 250 total points
ID: 38795937
TextBox1.Text = MonthCalendar1.SelectionStart.ToShortDateString

Private Sub MonthCalendar1_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateChanged
        ' ---- Show the slected date.
      TextBox1.Text = MonthCalendar1.SelectionStart.ToShortDateString
    End Sub
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question