JQuery datepicker icon trigger broken after inserting data to database
Posted
by
crisgine callano
on Stack Overflow
See other posts from Stack Overflow
or by crisgine callano
Published on 2012-09-21T21:35:55Z
Indexed on
2012/09/21
21:37 UTC
Read the original article
Hit count: 183
at first i got to load my icon for the JQuery datepicker but after i insert the value to my database the icon image is broken. im using Codeigniter framework.
here's my html code:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>CRUD</title>
<?php echo link_tag(base_url() . 'css/ui-lightness/jquery-ui-1.8.23.custom.css'); ?>
</head>
<body>
<div>
<?php
echo form_label('BDay:', 'bday');
$data = array(
'name' => 'bday',
'id' => 'datepicker'
);
echo form_input($data);
?>
</div>
</body>
</html>
and here's my jscript:
<script>
$(function() {
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
showOn: "button",
buttonImage: "<?php echo base_url() . '/images/icons/calendar_24.png' ?>",
buttonImageOnly: true,
onSelect: function(dateText, inst){
$("input[name='bday']").val(dateText);
}
});
});
am i missing something? thanks!
© Stack Overflow or respective owner