出廠年月 - 西元年月
元件:datepicker002
最小日:30年前的1月
最大日:本月
預設為:無
Default
Preview
請輸入或選擇西元年月
HTML

<div class="tw-form-group  ">
	<div datepicker002 data-date-format="us-yyyy-mm" data-plugin="comp/datepicker002,datepicker" data-type="comp" data-comp-name="datepicker002" class="tw-form-wrap  tw-relative tw-bg-white">
		<input type="tel" datepicker002Input name="madeDate" id="madeDate" autocomplete="off" class="tw-form-input" placeholder="西元 0000 / 00" value="2024 / 04" onchange="doCheckDate(event);" onblur="doCheckDate(event);">
		<div class=" tw-h-24 tw-border-l tw-border-neutral-300 tw-pl-16">
			<button datepicker002Trigger type="button" class="tw-h-24 tw-w-24 tw-transition-opacity tw-will-change-opacity hover:tw-opacity-30 active:tw-opacity-30">
			<img src="/img/icons/grey-calendar.svg" />
			</button>
		</div>
		<!-- dropdown -->
		<input type="hidden" value="" name="madeDateStore" id="madeDateStore" datepicker002InputStore />
		<div datepicker002Panel style="display: none" class="tw-absolute tw-top-44 tw-z-90 tw-w-[360px] tw-rounded-12 tw-bg-white tw-shadow-2 md:tw-right-0 lg:tw-left-0 lg:tw-right-auto">
			<div class="tw-relative tw-flex tw-flex-col">
				<div>
					<div class="tw-px-24 tw-py-16">
						<div class="tw-flex tw-items-center">
							<div class="tw-body-m tw-leading-none tw-text-neutral-900">選擇日期</div>
							<button datepicker002CloseBtn type="button" class="tw-ml-auto tw-h-20 tw-w-20 tw-transition-opacity tw-duration-100 tw-will-change-opacity hover:tw-opacity-30 active:tw-opacity-30">
							<img src="/img/icons/black-close.svg" />
							</button>
						</div>
					</div>
					<div>
						<div class="tw-relative tw-flex">
							<button type="button" datepicker002TabItem data-type="year" class="tw-flex tw-basis-1/2 tw-items-center tw-justify-center tw-py-16 hover:tw-text-primary-500 active:tw-text-primary-500">2024年</button>
							<button type="button" datepicker002TabItem data-type="month" class="tw-flex tw-basis-1/2 tw-items-center tw-justify-center tw-py-16 hover:tw-text-primary-500 active:tw-text-primary-500">1月</button>
							<div class="tw-absolute tw-bottom-0 tw-left-0 tw-h-1 tw-w-full tw-bg-neutral-variant-100"></div>
							<div datepicker002TabPointer class="tw-transition-left tw-will-change-left tw-absolute tw-bottom-0 tw-left-0 tw-h-4 tw-w-1/2 tw-rounded-3 tw-bg-primary-200 tw-duration-200"></div>
						</div>
					</div>
				</div>
				<div ddd class="tw-py-8">
					<div datepicker002YearContainer class="tw-h-[247px] tw-max-h-[247px] tw-overflow-y-auto" role="listbox"></div>
					<div datepicker002MonthContainer class="tw-h-[247px] tw-max-h-[247px] tw-overflow-y-auto" role="listbox"></div>
				</div>
				<div class="tw-border-t tw-border-neutral-variant-100 tw-px-40 tw-py-16">
					<button datepicker002Next type="button" class="tw-btn-primary tw-mt-4 tw-w-full">下一步</button>
					<button datepicker002Submit type="button" class="tw-btn-primary tw-mt-4 tw-w-full">確認</button>
				</div>
			</div>
		</div>
		<script yearMonthDropdownItem type="text/template">
			<button type="button" dropdownItem data-type="{type}" data-text="{text}" data-value="{value}" aria-checked="false" class="tw-body-l tw-group tw-flex tw-flex tw-h-40 tw-w-full tw-items-center tw-gap-x-16 tw-bg-white tw-px-16 tw-text-neutral-900 hover:tw-bg-primary-100 active:tw-bg-primary-100  group-aria-checked:tw-bg-primary-100" role="option">
			    <div class="group-hover:tw-opacity-1 group-active:tw-opacity-1 tw-h-24 tw-w-24 tw-shrink-0 tw-overflow-hidden tw-opacity-0 tw-transition-opacity tw-duration-200 tw-will-change-opacity group-aria-checked:tw-text-primary-400 group-aria-checked:tw-opacity-[1]">
			      <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
			        <path d="M3 11.625L9.2449 18L21 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
			      </svg>
			    </div>
			    <div class="tw-body-l tw-flex tw-items-center tw-text-left tw-text-[#1D1B20]">{label}</div>
			  </button>
		</script>
	</div>
	<div class="tw-form-hint tw-mt-2 tw-pl-16 tw-text-neutral-600">請輸入或選擇西元年月</div>
	<div class="tw-form-error-msg tw-mt-2 tw-pl-16"></div>
</div>
Default Value
格式:YYYY / MM ("/"前後,需有空格)

<input type="tel" datepicker002Input name="madeDate" id="madeDate" autocomplete="off" class="tw-form-input" placeholder="西元 0000 / 00" value="2024 / 04" >
                          
Preview
請輸入或選擇西元年月
HTML

<div class="tw-form-group  ">
    <div datepicker002 data-date-format="us-yyyy-mm" data-plugin="comp/datepicker002,datepicker" data-type="comp" data-comp-name="datepicker002" class="tw-form-wrap  tw-relative tw-bg-white">
        <input type="tel" datepicker002Input name="madeDate" id="madeDate" autocomplete="off" class="tw-form-input" placeholder="西元 0000 / 00" value="2024 / 04" onchange="doCheckDate(event);" onblur="doCheckDate(event);">
        <div class=" tw-h-24 tw-border-l tw-border-neutral-300 tw-pl-16">
            <button datepicker002Trigger type="button" class="tw-h-24 tw-w-24 tw-transition-opacity tw-will-change-opacity hover:tw-opacity-30 active:tw-opacity-30">
            <img src="/img/icons/grey-calendar.svg" />
            </button>
        </div>
        <!-- dropdown -->
        <input type="hidden" value="" name="madeDateStore" id="madeDateStore" datepicker002InputStore />
        <div datepicker002Panel style="display: none" class="tw-absolute tw-top-44 tw-z-90 tw-w-[360px] tw-rounded-12 tw-bg-white tw-shadow-2 md:tw-right-0 lg:tw-left-0 lg:tw-right-auto">
            <div class="tw-relative tw-flex tw-flex-col">
                <div>
                    <div class="tw-px-24 tw-py-16">
                        <div class="tw-flex tw-items-center">
                            <div class="tw-body-m tw-leading-none tw-text-neutral-900">選擇日期</div>
                            <button datepicker002CloseBtn type="button" class="tw-ml-auto tw-h-20 tw-w-20 tw-transition-opacity tw-duration-100 tw-will-change-opacity hover:tw-opacity-30 active:tw-opacity-30">
                            <img src="/img/icons/black-close.svg" />
                            </button>
                        </div>
                    </div>
                    <div>
                        <div class="tw-relative tw-flex">
                            <button type="button" datepicker002TabItem data-type="year" class="tw-flex tw-basis-1/2 tw-items-center tw-justify-center tw-py-16 hover:tw-text-primary-500 active:tw-text-primary-500">2024年</button>
                            <button type="button" datepicker002TabItem data-type="month" class="tw-flex tw-basis-1/2 tw-items-center tw-justify-center tw-py-16 hover:tw-text-primary-500 active:tw-text-primary-500">1月</button>
                            <div class="tw-absolute tw-bottom-0 tw-left-0 tw-h-1 tw-w-full tw-bg-neutral-variant-100"></div>
                            <div datepicker002TabPointer class="tw-transition-left tw-will-change-left tw-absolute tw-bottom-0 tw-left-0 tw-h-4 tw-w-1/2 tw-rounded-3 tw-bg-primary-200 tw-duration-200"></div>
                        </div>
                    </div>
                </div>
                <div ddd class="tw-py-8">
                    <div datepicker002YearContainer class="tw-h-[247px] tw-max-h-[247px] tw-overflow-y-auto" role="listbox"></div>
                    <div datepicker002MonthContainer class="tw-h-[247px] tw-max-h-[247px] tw-overflow-y-auto" role="listbox"></div>
                </div>
                <div class="tw-border-t tw-border-neutral-variant-100 tw-px-40 tw-py-16">
                    <button datepicker002Next type="button" class="tw-btn-primary tw-mt-4 tw-w-full">下一步</button>
                    <button datepicker002Submit type="button" class="tw-btn-primary tw-mt-4 tw-w-full">確認</button>
                </div>
            </div>
        </div>
        <script yearMonthDropdownItem type="text/template">
            <button type="button" dropdownItem data-type="{type}" data-text="{text}" data-value="{value}" aria-checked="false" class="tw-body-l tw-group tw-flex tw-flex tw-h-40 tw-w-full tw-items-center tw-gap-x-16 tw-bg-white tw-px-16 tw-text-neutral-900 hover:tw-bg-primary-100 active:tw-bg-primary-100  group-aria-checked:tw-bg-primary-100" role="option">
                <div class="group-hover:tw-opacity-1 group-active:tw-opacity-1 tw-h-24 tw-w-24 tw-shrink-0 tw-overflow-hidden tw-opacity-0 tw-transition-opacity tw-duration-200 tw-will-change-opacity group-aria-checked:tw-text-primary-400 group-aria-checked:tw-opacity-[1]">
                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path d="M3 11.625L9.2449 18L21 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
                    </svg>
                </div>
                <div class="tw-body-l tw-flex tw-items-center tw-text-left tw-text-[#1D1B20]">{label}</div>
                </button>
        </script>
    </div>
    <div class="tw-form-hint tw-mt-2 tw-pl-16 tw-text-neutral-600">請輸入或選擇西元年月</div>
    <div class="tw-form-error-msg tw-mt-2 tw-pl-16"></div>
</div>
Set Value
格式:YYYY / MM / DD ("/"前後,需有空格)
Preview
請輸入或選擇西元年月
JS

<button type="button" class="tw-btn-small-primary" onclick="setValueToElement('2024 / 02');">設定日2024 / 02</button>
                                                    

<script>
    function setValueToElement(value){
        let target
        target = document.querySelector('[name=madeDate3]')
        //use jquery to get element
        //target = $('[name=madeDate3]').get(0);
        target.value = value
        target.setValue(value);
    }
</script>
                                                                                
Validate Code Reference
請依照實際開發狀況調整
JS

<script>
    function doCheckDate(event) {
        const targetElm = event.target;
        const value = targetElm.value.trim();
        const date = new Date(value+" / 01");
        const dateFormatRegex = /^\d{4}\s*\/\s*\d{2}$/;
        if (value === '') {
            setInputStatus(targetElm, 'error', '請輸入資料');
        } else if (!dateFormatRegex.test(value)) {
            setInputStatus(targetElm, 'error', '日期格式應為 YYYY / MM');
        } else if (isNaN(date) || date === 'Invalid Date') {
            setInputStatus(targetElm, 'error', '請輸入有效的日期');
        } else {
            setInputStatus(targetElm, 'success');
        }
    }
</script>
                                                    
會員登入
網路會員可直接登入,加速您投保流程
請使用「新式居留證統一證號」重新註冊會員,或前往移民署換發中華民國居留證以取得新證號。若持舊式居留證,為避免保險中斷,請親自前往本公司服務據點辦理重新投保。
dsdsdsdsdss
保存試算
請提供聯繫資料,以便寄送本次試算內容連結。透過專屬連結回官網投保,無需重新輸入資料,且可享有線上投保優惠,有效期限至2024/01/10中午12:00止
請輸入收件者名稱
請輸入收件者的手機號碼
請輸入收件者的電子信箱
繼續投保
請輸入身分證/居留證號碼
請輸入共16碼數字
僅供於本站保存試算過的客戶使用。
分享優惠方案給親友,加速投保。有效期限至2024/06/05晚上23:59止。
設定提醒
請輸入收件者的電子信箱
您要繼續使用嗎?
為了您的資料安全,系統會將一段時間未使用者登出,若仍需使用請點選「繼續使用」,否則將於24秒後自動登出。
選擇日期
手機截圖縮小教學
手機截圖方法
步驟1. 於相簿中打開欲上傳的要保書照片或PDF檔
步驟2. 擷取手機螢幕上的畫面
步驟3. 上傳擷取後的相片
適用iPhone X/XR/XS 或以上機型
同時按下「電源鍵」與左邊的「上音量鍵」擷取螢幕
適用iPhone 6/7/8/SE 等機型
同時按下「電源鍵」與「Home 鍵」擷取螢幕
COSTCO會員卡驗證
如何查詢卡號
COSTCO金星或商業會員卡
共11碼
COSTCO聯名卡
共11碼
若您有任何疑問,請撥打好市多客服電話:(02)449-9909