sábado, setembro 04, 2010

JQuery para Date Picker

Primeiro efectuar download de Jquery:
http://jqueryui.com/download/

De seguida integra-lo no VS na solução. Copy paste dos scripts.

Colocar o seguinte código nos header das páginas.


<!-- Jquery para datepicker -->

        "<link href="../js/jquery-ui-1.8.4.custom/css/ui-lightness/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css" />

        <script type="text/javascript" src="../js/jquery-ui-1.8.4.custom/development-bundle/jquery-1.4.2.js"></script>

        <script type="text/javascript" src="../js/jquery-ui-1.8.4.custom/development-bundle/ui/jquery-ui-1.8.4.custom.js"></script>

        <script type="text/javascript" src="../js/jquery-ui-1.8.4.custom/development-bundle/ui/jquery.effects.core.js"></script>

        <script type="text/javascript" src="../js/jquery-ui-1.8.4.custom/development-bundle/ui/jquery.ui.datepicker.js"></script>

        <script type="text/javascript" src="../js/jquery-ui-1.8.4.custom/development-bundle/ui/i18n/jquery.ui.datepicker-pt-BR.js"></script>

        <script type="text/javascript" >

            $(document).ready(function () {

                $.datepicker.setDefaults($.datepicker.regional['']);

                $("input[name*='dtactivodeTextBox']").datepicker($.datepicker.regional['pt-BR']);

                $("input[name*='dtactivodeTextBox']").datepicker();

                $("input[name*='dtactivoateTextBox']").datepicker($.datepicker.regional['pt-BR']);

                $("input[name*='dtactivoateTextBox']").datepicker();

                

            });

        </script>"

        <!-- Fim jquery datepicker -->

Sem comentários: