Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-04-06
4
Medium Priority
?
938 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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses

782 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