?
Solved

how to capture date/time using asp.net "out of box" controls

Posted on 2011-05-12
6
Medium Priority
?
448 Views
Last Modified: 2012-05-11
I have a web form that requires the user to enter a date and time.

The closest I can find for this functionality is:
 - calendar control with the  AJAXControlToolkit CalendarExender for the date
and
 - textbox with Ajaxcontroltoolkit  maskededitextender (where MaskType="Time")
 or
-  3 ddls: one for hour, one for minute, one for seconds

Here is the part that makes this challenging: I don't want to use a 3rd party control like Peterblum.

Can anyone share their magic for how to capture date and time using "out of the box" web controls?  

Thank you so much for helping!
.
0
Comment
Question by:ToolTimeGang
  • 2
  • 2
  • 2
6 Comments
 
LVL 10

Expert Comment

by:MaxOvrdrv2
ID: 35746302
hmmm... i'm not sure i understand your question... if you use the Calendar, then you get the date without problems in the back-end... and for the time, if you have a known interval
(Example: spans of 15 minutes: 12:00, 12:15, 12:30, 12:45, 1:00, etc)
then all you need to do is setup a drop-down with a loop to populate it, and you're done.
0
 

Author Comment

by:ToolTimeGang
ID: 35746385
Yes.  That is correct.  I was wondering however if I could capture the date/time using just one control.  I'm thinking that is not possible however.

So I am on the right track then hey?  (thx for getting back to me so quickly!)

I'm thinking this might be a good candidate for a user control!
0
 
LVL 10

Assisted Solution

by:MaxOvrdrv2
MaxOvrdrv2 earned 1000 total points
ID: 35746398
yeah if you want to do both in one control, override the calendar control / make your own user control with both of these in it. there's no inherent control in ASP.Net to capture both the date and time in one.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Accepted Solution

by:
gery128 earned 1000 total points
ID: 35746410
Are you open to use jQuery ?

You can have a look here:
http://razum.si/jQuery-calendar/TimeCalendar.html
0
 

Author Comment

by:ToolTimeGang
ID: 35746471
MaxOvrdrv2:  Thank you again!

qery128: yes!  not using jQuery yet, but this is a great way to get going on it.  I really like the example.
thank you for sharing.

I will split the points between both of you.

thanks again for helping.  I am trying to get my skillset updated from 1.1 to 4.0.  Lots to learn.  I am very thankful I have Experts to guide me in that transition.

0
 
LVL 9

Expert Comment

by:gery128
ID: 35746498
Glad to help :)
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

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
This article discusses how to implement server side field validation and display customized error messages to the client.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

809 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