Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/start/jquery-ui.css"
      rel="Stylesheet" type="text/css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />


<div class="date-example-container">	
			<div class="selection">
				<label>Waarheen gaan jy?</label>
				<ul class="list-unstyled" style="list-style: none;">
				
				  <li class="init">Naam van Blyplek</li>
				  <li data-value="value 7"><span class="value">khwa-ttu-san-culture-and-education-centre</span><span class="real">!Khwa Ttu</span><span class="numbers"><span class="orange"></span>Blyplekke</span></li>
				  <li data-value="value 2"><span class="value">piekenierskloof-mountain-lodge</span><span class="real">Piekenierskloof Mountain Resort</span><span class="numbers"><span class="orange">1077</span> Blyplekke</span></li>
				  <li data-value="value 3"><span class="value">russells-on-the-port?q=russells-on-the-port</span><span class="real">Russells On Port</span><span class="numbers"><span class="orange">311</span> Blyplekke</span></li>
				  <li data-value="value 4"><span class="value">blue-bay-lodge-resort</span><span class="real">Blue Bay Lodge<span><span class="numbers"><span class="orange">248</span> Blyplekke</span></li>
				  <li data-value="value 5"><span class="value">the-lodge-at-atlantic-beach</span><span class="real">The Lodge at Atlantic Beach</span><span class="numbers"><span class="orange">436</span> Blyplekke</span></li>
				  <li data-value="value 6"><span class="value">thali-thali-game-lodge</span><span class="real">Thali Thali Game Lodge</span><span class="numbers"><span class="orange">2120</span> Blyplekke</span></li>
				</ul>	
			
			</div>	
			<div id="yesyes">
				<div class="from-to">			
					<div class="from">
						<div class="label">
							<label>Vanaf</label>
							<input placeholder="Inklok" type="text" id="dt1" />	
						</div>		  							  
						<i class="fa fa-calendar-o" aria-hidden="true"></i>			
					</div>			
					<div class="to">
						<div class="label">
							<label>Tot</label>	  
							<input placeholder="Uitklok" type="text" id="dt2" />
						</div>				  
						<i class="fa fa-calendar-o" aria-hidden="true"></i>			
					</div>		
				</div>			
				<div class="field right">
					
					
					<div class="label">
						<label>Aantal gaste</label>				
						<select id="search-pax" name="pax" class="ls-select ">
							<option value="1">1 gas</option>
							<p>Vim aqui pra vadiar</p>
							<option value="2">2 gaste</option>					
							<option value="3">3 gaste</option>					
							<option value="4">4 gaste</option>					
							<option value="5">5 gaste</option>					
							<option value="6">6 gaste</option>					
							<option value="7">7 gaste</option>					
							<option value="8">8 gaste</option>					
							<option value="9">9 gaste</option>					
							<option value="10">10 gaste</option>				
							<option value="11">11 gaste</option>				
							<option value="12">12 gaste</option>				
							<option value="13">13 gaste</option>				
							<option value="14">14 gaste</option>				
							<option value="15">15 gaste</option>				
							<option value="16">16 gaste</option>				
							<option value="17">17 gaste</option>				
							<option value="18">18 gaste</option>				
							<option value="19">19 gaste</option>				
							<option value="20">20 gaste</option>				
						</select>	
					</div>			
					<div class="icon" tabindex="0">
						<div>
							<i class="fa fa-male" aria-hidden="true"></i>
						</div>
					</div>			
				</div>
				<a id="atributo"href="#" target="_blank">SOEK AKKOMMODASIE</a>
			</div>			
		</div>
              
            
!

CSS

              
                .date-example-container i.fa {
    color: #555;
	margin-left: 15px;
}

.date-example-container {
    width: 100%;
    max-width: 350px;
    margin: 20px auto;
	color: #9999a2;
	clear: both;
	font-family: Arial, Helvetica, sans-serif;
}

.date-example-container label {
    color: #000;
}

input#txtTo,
input#txtFrom{
  position: relative;
  padding: 10px;
}

input#txtFrom:after{
  font-family: fontawesome;
  content: '\f073';
  psotion: absolute;
}

.fa-calendar-o{
  position: absolute;
  right: 0;
  top: 39px;
  padding: 10px;
}
.submit-here{
  display: inline-block;
  background: #ee782e;
  border: 0;
  color: white;
  padding:10px;
  margin-top: 10px;
}

select{
  width: 100%;
  padding: 10px;
  -webkit-appearance: none;
}

.date-example-container .field.right {
    position: relative;
	float: none;
	clear: both;
}

.icon {
    width: 26px;
    height: 40px;
    position: absolute;
    right: 0;
    color: #000;
	font-size: 18px;
}

.from-to i {
    font-size: 18px;
}

.selection{
  position: relative;
}

.date-example-container .field.right .icon {
	top: 46px;
	background-color: white;
}

.selection .icon {
    top: 34px;
}

.from-to .icon{
	right: 3px;
	top: 26px;
}

.date-example-container input,
.date-example-container select{
	border: 1px solid #000;
	border-radius: 2.5px;
}

.date-example-container input{
	width: 100%;
}

.date-example-container label {
    display: block;
	padding: 5px 0;
}

.from {
    float: left;
}

.to {
    float: right;
}

.from, .to {
    position: relative;
	width: 100%;
    max-width: 160px;
}

a#atributo:hover {
    background-color: #F15A24 !important;
    border-top: 1.5px solid #F15A24;
    color: white;
	transition: all .2s ease-in-out;
	-webkit-transition: all .2s ease-in-out;
}

a#atributo {
    display: block;
    background: #ee782e;
    border: 0;
    color: white;
    padding: 10px;
    margin-top: 10px;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    border-radius: 2.5px;
    border-bottom: 2px solid #F15A24;
    animation-duration: .1ms;
    -webkit-animation-name: mui-node-inserted;
    animation-name: mui-node-inserted;
    -webkit-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
    cursor: pointer;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-sizing: border-box;
    border-top: 1.5px solid #FBB03B;
    font-size: 16px;
    line-height: 1.15;
    letter-spacing: 1px;
}

td.ui-datepicker-unselectable.ui-state-disabled {
    background: white;
    color: #ebebeb;
}

table.ui-datepicker-calendar td {
    border: 0;
    background: #DADADA;
    color: black;
}

a.ui-state-default {
    color: #555;
}

.ui-datepicker-title > span {
    border-bottom: 1px solid;
}

.ui-datepicker-calendar th {
    background: transparent !important;
    border: 0 !important;
    color: #999 !important;
    font-weight: bold !important;
}

input#txtTo:active, 
input#txtFrom:active,
select#search-pax:active,
input#txtTo:hover, 
input#txtFrom:hover,
select#search-pax:hover,
select#selection:hover,
select#selection:active,
ul.list-unstyled:hover,
ul.list-unstyled:active {
    border-color: #EE782E;
    font-style: normal;
    outline: 0 !important;
}
.ui-datepicker .ui-datepicker-header .ui-datepicker-next,
.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{
	background: none;
}

.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after,
.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before{
	font-family: fontawesome;
	color: #999;
}

.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before {
	content: '\f0d9 ';   
}

.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after{	
	content: '\f0da';
}

div#black-studio-tinymce-8 {
    margin: 0;
    padding: 0;
}

div#black-studio-tinymce-8 p img,
div#black-studio-tinymce-8 p {
    padding: 0;
	margin: 0;
}

aside .widget {
    margin: 0;
}

ul.list-unstyled {
    margin: 0;
    border: 1px solid #000;
    position: absolute;
    width: 100%;
    z-index: 999;
   
	/*border: 1px solid #666 !important;*/
    border-radius: 2.5px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);

}

li.selected {
    border-top: 1px solid black;
}


ul.list-unstyled li { 
	padding: 5px 10px; 
	z-index: 2;	
}
ul.list-unstyled li:not(.init) {  
	display: none; 
	background: white; 
}
ul.list-unstyled li:not(.init):hover, ul li.selected:not(.init) { 
	background: #ee782e;
}

ul.list-unstyled li:not(.init):hover span.orange, ul li.selected:not(.init) span.orange{ 
	color: white;
}

ul.list-unstyled li {
    color: #555;
}

li.init { 
	cursor: pointer;
	color: #666;
	/*border-bottom: 1px solid #ccc;*/
}

ul.list-unstyled li:first-child {
   /* border: 1px solid #666 !important;*/
}



div#yesyes {
    margin-top: 12%;
}

li.init:after {
    content: '\f002';
    font-family: fontawesome;
    float: right;
    font-size: 18px;
    color: #555;
}

span.numbers {
    float: right;
}

.orange {
    color: #ee782e;
    display: none;
}
ul.list-unstyled.elegido.touchhere li:first-child {
    border-bottom: 1px solid #000;
}
a#submit { 
	z-index: 1; 
}

.value{
	display: none;
}

.widget-1.widget-first.widget-odd.widget-wrap.widget-inside {
    text-align: center;
}



input,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* CAUTION: IE hackery ahead */
select::-ms-expand { 
    display: none; /* remove default arrow on ie10 and ie11 */
}

/* target Internet Explorer 9 to undo the custom arrow */
@media screen and (min-width:0\0) {
    select {
        background:none\9;
        padding: 5px\9;
    } 
}

.date-example-container .field.right .icon {
	background-color: white;
	height: 28px;
    right: 10px;
}

.date-example-container .field.right .icon i.fa{
		background-color: white;
}



              
            
!

JS

              
                $(document).ready( function(){
		var num = 0;	

		$('.date-example-container ul.list-unstyled').on("click", function(){
			$(this).toggleClass('touchhere');
			$('ul.list-unstyled li:first-child').toggleClass('border-here');
			$(this).toggleClass('border-two');
		});
		
		$(".date-example-container ul").on("click", ".init", function() {
			$(this).closest("ul").children('.date-example-container li:not(.init)').toggle();
		});
		
		$('.date-example-container ul.list-unstyled').on("click", function(){
			$(this).addClass('elegido');
		});

	    var allOptions = $("ul").children('.date-example-container li:not(.init)');
	    $(".date-example-container ul").on("click", "li:not(.init)", function() {
			allOptions.removeClass('selected');
			$(this).addClass('selected');
			$(".date-example-container ul").children('.init').html($(this).find('span.real').html());
			allOptions.toggle();
	    });
		 
		$("#dt1").datepicker({
			dateFormat: "dd-M-yy",
			minDate: 0,
			onSelect: function (date) {
				var dt2 = $('#dt2');
				var startDate = $(this).datepicker('getDate','+1d');
				startDate.setDate(startDate.getDate()+1); 
				dt2.datepicker('option', 'minDate', startDate);
				dt2.datepicker('setDate', startDate);
			}
		});
		
		$('#dt2').datepicker({	
			dateFormat: "dd-M-yy",		
		});
		
		$("li#weskus").on('click', function() {
			$(this).addClass('weskusClass');
			num = 1;
			console.log(num);
		});
		
		

	    $('a#atributo').click(function() {
			var monthNames = [
				"Jan", "Feb", "Mar",
				"Apr", "May", "Jun", "Jul",
				"Aug", "Sep", "Oct",
				"Nov", "Dec"
			  ];

			var date1 = $("#dt1").datepicker('getDate'),
				day_1  = date1.getDate(),  
				month_1 = date1.getMonth() + 1,              
				year_1 =  date1.getFullYear();
					
			var date2 = $("#dt2").datepicker('getDate'),
				day_2  = date2.getDate(),  
				month_2 = date2.getMonth() + 1,              
				year_2 =  date2.getFullYear(); 
			
			var where_in = $('.date-example-container li.weskusClass span.value-in').text();
			
			var where = $('.date-example-container li.selected span.value').text();
			var people = $('#search-pax :selected').val();
			
			if( num == 1 ){
				$('a#atributo').attr("href", "https://www.lekkeslaap.co.za/akkommodasie-in/"+where_in+"?q="+where_in+"&start="+day_1+"+"+monthNames[month_1]+"+"+year_1+'&end='+day_2+'+'+monthNames[month_2]+'+'+year_2+'&pax='+people);
				num = 0;
			}
			else if( num < 1 ){
				$('a#atributo').attr("href", "https://www.lekkeslaap.co.za/akkommodasie/"+where+"?q="+where+"&start="+day_1+"+"+monthNames[month_1]+"+"+year_1+'&end='+day_2+'+'+monthNames[month_2]+'+'+year_2+'&pax='+people);
			}	
			
		});

	});

              
            
!
999px

Console