Skip to content

Date picker appears at bottom of page before click #2179

Open
@Nicksab82

Description

@Nicksab82

I am currently using datepicker on my site with the following code:

$(function(){
	$("#attrib-23-0").attr( 'readOnly' , 'true' );
    $('#attrib-23-0').datepicker({ 
	  dateFormat: 'MM dd, yy',
	  beforeShowDay: function(date){
var string = jQuery.datepicker.formatDate('mm/dd/yy', date);
var day = date.getDay();
return [ ( day > 0 && day < 6 && dates.indexOf(string) == -1), "" ];
	}
});
    var dates = ["07/14/2023","2023-07-04", "04-07-2023", "07/05/2023", "07/04/2023","07/06/2023","07/03/2023","07/07/2023"];
	
    var d = new Date();
    var targetTimeOffset  = +6*60; //desired time zone, taken as GMT-4
    d.setMinutes(d.getMinutes() + d.getTimezoneOffset() + targetTimeOffset );
    $( "#attrib-23-0" ).datepicker( "option", "minDate", d );
});

When the page is first accessed, the calendar is displayed at the bottom of the page. Once the input field is clicked, the calendar is displayed correctly and the one at the bottom of the page disappeared.

Is this a known bug ? or is there a way to fix it?

An sample page can be seen here: https://www.royal-fleur.com/all-flowers/above-larkspur-sunset-bouquet

Thank you in advance for the help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions