⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Datepicker not loading



asdrubal
  • profile picture
  • Member

Posted 15 August 2012 - 16:11 PM

Hello

I've found your CRUD once I had my tables already implemented looking for alternative CRUD solutions. Anyways I really like the way you have styled your forms (jquery ui smothness and datatables style). I've managed to copy the styling (hope you don't mind) but cannot get datepicker to show. If I include "official" script it breaks my design so I'm trying to do it your way.

This I have in head for now - all paths correct:
[html]<link type="text/css" href="grocery_crud/themes/datatables/css/datatables.css" rel="Stylesheet" />
<link type="text/css" href="grocery_crud/css/ui/simple/jquery-ui-1.8.10.custom.css" rel="Stylesheet" />


<script type="text/javascript" language="javascript" src="grocery_crud/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" language="javascript" src="grocery_crud/themes/flexigrid/js/jquery.form.js"></script>
<script type="text/javascript" language="javascript" src="grocery_crud/themes/datatables/js/datatables-add.js"></script>
<script type="text/javascript" language="javascript" src="grocery_crud/js/jquery_plugins/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" language="javascript" src="grocery_crud/js/jquery_plugins/jquery.ui.datetime.js"></script>
<script type="text/javascript" src="grocery_crud/js/jquery_plugins/config/jquery.datepicker.config.js"></script>
<script type="text/javascript" src="grocery_crud/js/jquery_plugins/config/jquery.datetime.config.js"></script>
<link type="text/css" href="grocery_crud/css/jquery_plugins/jquery.ui.datetime.css" rel="Stylesheet" /> [/html]


and class='datetime-input' for every date input field.

What am I missing here? Should a class be different?

carlinchisart
  • profile picture
  • Member

Posted 16 August 2012 - 04:41 AM

Hi @asdrubal, i resolved this use jquery, see this http://docs.jquery.com/UI/Datepicker

so do you have to import a jquery files

<script src="<?php echo base_url() ?>assets/grocery_crud/js/jquery-1.7.1.min.js"></script>
<script src="<?php echo base_url() ?>assets/grocery_crud/js/jquery_plugins/jquery-ui-1.8.10.custom.min.js"></script>


and use the function $document.ready

$(document).ready(function(){
$("#idFieldshowDate").datepicker();
});


this solution work for me, i try to include the same files of GC but no work.

asdrubal
  • profile picture
  • Member

Posted 16 August 2012 - 06:37 AM

Thanks, it actually worked for me now even though I've tried it before.