Kod
<input type="text" name="pole1" id="pole1" />
Jeśli dynamicznie to wtedy NIE działa.
Kod
var element1 = document.createElement('input');
element1.setAttribute('type', 'text');
element1.setAttribute('name', "pole2");
element1.setAttribute('id', "pole2");
document.getElementById("my_div").appendChild(element1);
element1.setAttribute('type', 'text');
element1.setAttribute('name', "pole2");
element1.setAttribute('id', "pole2");
document.getElementById("my_div").appendChild(element1);
kod jquery
Kod
$(function() {
$('#pole1').datepick({
dateFormat: 'yy-mm-dd'
});
$('#pole2').datepick({
dateFormat: 'yy-mm-dd'
});
});
$('#pole1').datepick({
dateFormat: 'yy-mm-dd'
});
$('#pole2').datepick({
dateFormat: 'yy-mm-dd'
});
});