Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to set Datetimepicker in vb.net windows form as default to -Select Date-

Posted on 2012-04-06
4
Medium Priority
?
922 Views
Last Modified: 2012-08-14
I want to set the datetimepicker in vb.net windows form to its default value as --select date--
Because otherwise what default value can be put
0
Comment
Question by:searchsanjaysharma
[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
4 Comments
 
LVL 12

Assisted Solution

by:Anuradha Goli
Anuradha Goli earned 750 total points
ID: 37815641
Use javascript to set watermark text for text box
 
function watermark(inputId,text)
    {
        var inputBox = document.getElementById(inputId);
        if (inputBox.value.length > 0)
        {
            if (inputBox.value == text)
            inputBox.value = '';
        }
        else
            inputBox.value = text;
    }

Open in new window


<input type="text" name="startdate" class="tcal" id="startdate" readonly="readonly"
                                onfocus="watermark('startdate','select startdate');" onblur="watermark('startdate','select startdate');" />

so that text disappears when mouse hovered

yo can use calendar code attached
index.zip
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 750 total points
ID: 37815820
not sure if you can write something because it isn't a valid value. one thing for sure, you can leave it empty. check http://emoreau.com/Entries/Articles/2005/01/The-DateTimePicker-control.aspx
0
 

Accepted Solution

by:
searchsanjaysharma earned 0 total points
ID: 37850474
kindly give inputs for windows form in vb.net datetimepicker
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 37934031
ok
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

722 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