Kuv yuav hloov Datepicker hom ntawv hauv bootstrap li cas?
Kuv yuav hloov Datepicker hom ntawv hauv bootstrap li cas?

Video: Kuv yuav hloov Datepicker hom ntawv hauv bootstrap li cas?

Video: Kuv yuav hloov Datepicker hom ntawv hauv bootstrap li cas?
Video: Kuv Yuav Hloov Kuv Tus Txwjnkawm Li Cas? (How Do I Change My Spouse?) | Zaj 1 | Kx. Ntxoov Lis Yaj 2024, Kaum ib hlis
Anonim

Mus rau kab 1399 thiab nrhiav hom ntawv : 'mm/dd/yyyy'. Tam sim no koj ua tau hloov hnub tim hom ntawv ntawm no. Mus rau kab 1399 thiab nrhiav hom ntawv : 'mm/dd/yyyy'. Tam sim no koj ua tau hloov hnub tim hom ntawv ntawm no.

Ua raws li qhov no, Kuv yuav hloov Datepicker hom ntawv li cas?

Los ntawm lub neej ntawd, hnub tim hom ntawv ntawm jQuery UI Datepicker yog US hom ntawv mm / dd / yy, tab sis peb tuaj yeem teeb nws rau qhov kev cai tso saib hom ntawv , xws li: rau hnub European dd-mm-yyyy thiab lwm yam. Kev daws yog siv cov hnub xaiv dateFormat kev xaiv…thiab siv cov cai hauv qab no rau hloov tus hom ntawv nrog rau qhov kev xaiv dateFormat.

Ib yam li ntawd, koj siv lub hnub xaiv li cas? Cov datepicker yog khi rau ib tug qauv daim ntawv input teb. Tsom ntsoov rau cov tswv yim (nias, lossis siv tus yuam sij tab) qhib ib daim ntawv qhia hnub sib tham hauv ib qho me me. Xaiv ib hnub , nyem rau lwm qhov ntawm nplooj ntawv (blur the input), lossis ntaus Esc tus yuam sij kaw. Yog ib hnub yog xaiv, tawm tswv yim yog qhia raws li cov tswv yim tus nqi.

Tsis tas li ntawd, bootstrap puas muaj Datepicker?

Bootstrap - datepicker muab ib tug saj zawg zog datepicker widget nyob rau hauv Bootstrap style. Versions yog incremented raws li semver.

Kuv tuaj yeem tau txais hnub tam sim no hauv Datepicker li cas?

Teeb hnub tim tam sim no hauv kev tswj qhov twg jQuery UI datepicker khi, siv setDate() txoj kev. Hla hnub khoom uas yuav tsum tau teem ua ib qho kev sib cav rau setDate() txoj kev. Yog koj xav teem caij rau hnub tim tam sim no ces koj tuaj yeem hla ' hnub no ' raws li kev sib cav.

Pom zoo: