473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

DHTML DateTime Picker

Hi

Does anyone know of a DHTML Date Picker that also allows to pick time
apart from the date.

I need it to enter Data and Time into a field that will ultimately
popular a column in an SQL Server 2000 table.

Thanks

Vijay

Dec 29 '06 #1
2 6369
vijay wrote:
Hi

Does anyone know of a DHTML Date Picker that also allows to pick time
apart from the date.

I need it to enter Data and Time into a field that will ultimately
popular a column in an SQL Server 2000 table.

Thanks

Vijay
<script>
t = new Date();
m = t.getMonth();
d = t.getDay();
dt = t.getDate();
y = t.getFullYear();
h = t.getHours();
if (h < 12) {
ap="AM";
} else {
ap="PM";
h=h-12;
}
mn= t.getMinutes();
s = (t.getSeconds();
if (h==0) {
h = 12
}

date=m+'/'+dt+'/'+y;
time=h+':'+mn+':'+s;

</script>

You can use t = new Date('January 06 2008 12:58:02 CST') if you need to
specify a specific time/date instead of just using the present time/date.

You can find out more about javascript's date object here:
http://www.w3schools.com/js/js_obj_date.asp

Good luck!

--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Dec 29 '06 #2
Thanks for the cool source-code. Well that's fine enough. But i want a
popup calendar like the one at -

http://www.dynamicdrive.com/dynamici...oncalendar.htm

By far this is the best calendar script. But it does not have the
ability to enter time information.

My base requirement is that i have a text field (No multiple fields,
drop downs etc.) and when the user tabs into the field, a calendar must
popup which will allow the user to choose both date and time. When its
done the text field gets populated with the date and time. Something
like - 28/12/2006 09:30 PM

Is there such a DHTML date picker or will i end up writing one?

Dec 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Colin Joss | last post by:
Sorry folks, being a bit dense here. I need a DateTime Picker for a PDA application I'm building. Couldn't see one in the standard tools so search Microsoft. Found one. Downloaded it. Now...
0
by: Ata İsmet Özçelik | last post by:
Hi there, I have a problem with the DateTime picker.. I want to use my custom format; for this I can give a string for the format.But My goal is to have the month name in the box in upper case...
1
by: Dean L. Howen | last post by:
Dear friends, Could you help me to solve the problem: How can we set/get NULL values of datetime in DatetimePicker ? I design a form using DateTimePicker to input/output date value, but the date...
0
by: Qumer Mumtaz Goraya | last post by:
Hi There is a datatime picker control in one column of my datagrid.When the cell of sepecific column get the focus the datetime picker control appeare It shows the current system date.If once I...
5
by: Michel Posseth [MCP] | last post by:
Hello we have encountered the following problems with the date time picker control A : datetime picker control gives focus to last entered field when moving back and forward with focus how do...
1
mafaisal
by: mafaisal | last post by:
Hello Experts I am Using vb.net 2005 Hw To Put DateTime Picker in Datagrid view I have to sea Datetime Picker in Specified Cilomn of Datagrid I try This But The Location Hw To Change to the...
4
by: gggram2000 | last post by:
Hi, I'm using php 5.2.3 with mysql server 5.1 as backend. I have a program in which a person enters or chooses two dates from two datetime pickers and other info, I'm not sure if the problem is...
1
by: sonubaba | last post by:
hello, my question is, in my web application i need datetime picker control in which user can select both date and time from DateTime Picker control i could not find this anywhere on inter net ...
0
by: =?Utf-8?B?a3BpenpsZQ==?= | last post by:
Hi all. using vs.net 9, C# I've got a trivial dilemma right now with my datetimepicker. It is bound to a datetime field in a database. This field is also set to not allow nulls. The default...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.