dotnetspider.com


 


TutorialsForumResourcesReviewsJobsInterviewVideosCommunitiesProjectsTraining

Subscribe to Subscribers


Online MembersRavindran
abhishek
chirag jaguwala
R.Jaya kumar (JK)
Ajatshatru Upadhyay
More...




Forums » .NET » ASP.NET »

Date time picker


Posted Date: 13 May 2009      Posted By:: Tushar Jindle     Member Level: Silver    Member Rank: 2131     Points: 1   Responses: 7



Hello,
do anyone have datetimepicker control to use on webpage i'm using c# .net
Thanks in advance
Regards,
Tushar Jindle





Responses

#377716    Author:       Member Level: Gold      Member Rank: 51     Date: 13/May/2009   Rating: 3 out of 53 out of 53 out of 5     Points: 3

Hi,

You can download javascript datetimepicker by googling or use ajax calender control check this link for more info
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx

Regards,
Phani Harshitha Madala
My blog:www.phmadala.wordpress.com

Rate this Response[Excellent/Good/Poor]
Follow me on twitter



#377718    Author:       Member Level: Gold      Member Rank: 60     Date: 13/May/2009   Rating: 2 out of 52 out of 5     Points: 2

i think u can use ajax calendar extender control


#377719    Author:       Member Level: Gold      Member Rank: 391     Date: 13/May/2009   Rating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

Hai

You can use ajax calender extender in web page. Check the below code.

<table cellpadding="2" cellspacing="2">
<tr>
<td><asp:TextBox ID="txtDate" runat="server" CssClass="txt"></asp:TextBox> <asp:Image runat="Server" ID="Image1" ImageUrl="~/Image/showcalendar.png" />
<ajaxToolkit:CalendarExtender ID="calendarButtonExtender" runat="server" TargetControlID="txtDate" PopupButtonID="Image1" /></td>
</tr>
</table>

check this link also

http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Calendar/Calendar.aspx






#377725    Author:       Member Level: Silver      Member Rank: 0     Date: 13/May/2009   Rating: 2 out of 52 out of 5     Points: 2

Adding a DateTimePicker manually

You can add a DateTimePicker to a form at run time in the following manner:

private void AddDateTimePicker()
{
DateTimePicker DateTimePicker1 = new DateTimePicker();

//Set size and location.
DateTimePicker1.Location = new Point(40, 88);
DateTimePicker1.Size = new Size(160, 21);

// Set the alignment of the drop-down MonthCalendar to right.
DateTimePicker1.DropDownAlign = LeftRightAlignment.Right;

// Set the Value property to 50 years before today.
DateTimePicker1.Value = System.DateTime.Now.AddYears(-50);

//Set a custom format containing the string "of the year"
DateTimePicker1.Format = DateTimePickerFormat.Custom;
DateTimePicker1.CustomFormat = "MMM dd, 'of the year' yyyy ";

// Add the DateTimePicker to the form.
this.Controls.Add(DateTimePicker1);
}


try This



#377764    Author:         Member Level: Gold      Member Rank: 7     Date: 13/May/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi,

You can drag and drop the datetimepicker button from the toolbox on to the form and set the property "format=long" or other option in C#.

Ex;
Open new project on the form drag and drop datetimepicker set the property create a button and name it "Click". For the "click_button" write the code as messagebox.show("selected time:"+datetimepicker1.text);



Thanks & Regards,
Deepika - Sr. Editor
Webmaster, GujaratSpider
http://angeldeeps.blogspot.com/
"Experience is the name everyone gives to his mistakes"
GujaratSpider - Post and Earn



#377791    Author:       Member Level: Silver      Member Rank: 1723     Date: 13/May/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi

See the following Article
http://www.codeproject.com/KB/webforms/DateTimePicker.aspx




Thanks
Shweta D.Kulkarni



#378180    Author:       Member Level: Silver      Member Rank: 2131     Date: 14/May/2009   Rating: 2 out of 52 out of 5     Points: 2

thanks so much for your prompt reply
finally ajax calendar extendar worked




Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Dropdownlist values add from class method using c#
Previous : Error
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages

My Profile

Active Members
TodayLast 7 Daysmore...


Awards & Gifts


Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds



    About Us    Trademark Disclaimer    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.