Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > บทความจากสมาชิก > Setting jQuery DatePicker to display the interest period only by PlaKriM



 
Clound SSD Virtual Server

Setting jQuery DatePicker to display the interest period only by PlaKriM

มีน้องในเว็บบอร์ดถามว่าอยากจะทำ datepicker ให้มันเลือกแค่วันพุธทำยังไง เอาโค๊ด datepicker ที่ไหนไม่รู้มาให้แก้ ผมตาลาย เลยไม่แก้แต่เขียน jquery ให้ดีกว่า เริ่มกันเลย

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery beforeShowDay Setting</title>
<link type="text/css" href="jQuery/css/jquery-ui-1.8.9.custom.css" rel="stylesheet" />
<script type="text/javascript" src="jQuery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jQuery/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript">
var options = {
dateFormat: 'dd/mm/yy',
changeYear: true,
changeMonth: true,
buttonImageOnly: true,
buttonText: 'คลิกเลือกวันที่',
showOn: 'button',
buttonImage: 'images/date_picker.gif',
duration: 'fast',
beforeShowDay: function(date){ return [date.getDay() == 3,""]}
};

$(function(){
$('.datepicker').datepicker(options);
$("img[src$='images/date_picker.gif']").mouseover(function() {$(this).css('cursor','pointer');});
});
</script>
<style type="text/css">
.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div {font:10px Tahoma, Geneva, sans-serif;}
</style>
</head>
<body>
<input type="text" name="textfield" class="datepicker" />
</body>
</html>


Copy หรือ Download ไปทดสอบรันดูได้เลยครับ


บทความอื่น ๆ ที่เกี่ยวข้อง
Go to : jQuery Tutorial : สอน jQuery เขียน jQuery กับ JavaScript เรียน jQuery ในประเทศไทย


Reference : http://forum.jquery.com/topic/datepicker-select-only-mondays





   
Share
Bookmark.   

  By : PlaKriM
  Article : บทความเป็นการเขียนโดยสมาชิก หากมีปัญหาเรื่องลิขสิทธิ์ กรุณาแจ้งให้ทาง webmaster ทราบด้วยครับ
  Score Rating :
  Create Date : 2011-02-02
  Download : Download  Setting jQuery DatePicker to display the interest period only by PlaKriM (0.1032 MB)
Sponsored Links
ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่