Solved

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

Posted on 2012-04-06
4
905 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 69

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
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 …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now