Solved

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

Posted on 2012-04-06
4
909 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 250 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 250 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 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