Solved

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

Posted on 2013-01-18
2
2,382 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

634 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