Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
JqueryUI - Populate an alternate field with its own date format whenever a date is selected using the altField and altFormat
SUBMITTED BY:
jlolk3r
DATE:
Feb. 15, 2016, 9:13 a.m.
FORMAT:
HTML
SIZE:
722 Bytes
Raw
Download
Tweet
HITS:
1150
Go to comments
Report
<!doctype html>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"utf-8"
>
<
title
>
jQuery UI Datepicker - Populate alternate field
</
title
>
<
link
rel
=
"stylesheet"
href
=
"//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"
>
<
script
src
=
"//code.jquery.com/jquery-1.10.2.js"
></
script
>
<
script
src
=
"//code.jquery.com/ui/1.11.4/jquery-ui.js"
></
script
>
<
link
rel
=
"stylesheet"
href
=
"/resources/demos/style.css"
>
<
script
>
$
(
function
()
{
$
(
"#datepicker"
).
datepicker
({
altField
:
"#alternate"
,
altFormat
:
"DD, d MM, yy"
});
});
</
script
>
</
head
>
<
body
>
<
p
>
Date:
<
input
type
=
"text"
id
=
"datepicker"
>
<
input
type
=
"text"
id
=
"alternate"
size
=
"30"
></
p
>
</
body
>
</
html
>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus