Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/04/2012, 12:38
Avatar de Naahuel
Naahuel
 
Fecha de Ingreso: marzo-2011
Ubicación: localhost
Mensajes: 796
Antigüedad: 13 años, 1 mes
Puntos: 192
Respuesta: Deshabilitar fecha en DataPicker

1.- Es Inhabilitar :P

2.- .datepicker() tiene la opción maxDate: http://jqueryui.com/demos/datepicker/#option-maxDate

Sería así:

Código Javascript:
Ver original
  1. $( ".selector" ).datepicker({ maxDate: '+0d' });

Es decir, 0 días hacia adelante a partir de hoy. Tené en cuenta que esta fecha es obtenida de la computadora del cliente y puede estar mal.

Ejemplo:
Código HTML:
Ver original
  1. <!doctype html>
  2.     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  3.     <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" />
  4.     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
  5.     <script type="text/javascript">
  6.         $(function(){
  7.             $( "input" ).datepicker({ maxDate: '+0d' });
  8.         });
  9.     </script>
  10.     <title></title>
  11. </head>
  12.     <input />
  13. </body>
  14. </html>
__________________
nahueljose.com.ar