5
tengo varias datepickers en una página ... todo parece estar funcionando bien, excepto que la parte altfield ...jQuery selector de fechas - altfield tema dinámico
es algo como esto posible ??
$(document).ready(function(){
$(".datepicker").datepicker({
beforeShowDay: function(date){ return [(date.getDay() == 1 || date.getDay() == 4), ""] },
showOn: "button",
buttonText: "Book now...",
showWeek: true,
firstDay: 1,
onSelect: function(date) {
$(this).parent().find('.selecteddate').prepend("Date: " + $(this).parent().find('.datepicker').val() + " - <a href='javascript:;' class='cleardate'>clear date</a>");
$(this).parent().find('button').hide();
},
dateFormat: "DD, d MM, yy",
altField: $(this).closest('div').find('.datepickeralt'),
altFormat: "dd/mm/yy",
navigationAsDateFormat: true,
minDate: 0,
});
$(".cleardate").live('click',function(){
$(this).closest('div').find('.datepicker').datepicker("setDate", null);
$(this).closest('div').find('.datepickeralt').val("");
$(this).closest('div').find('button').show();
$(this).parent().html("");
});
});
@Tom - Aquí está la demostración implementada con su código: http://jsfiddle.net/nick_craver/BhzE5/1/ –
@NickCraver Genius! –