문제

I am using the jquery mobile datebox at http://dev.jtsage.com/jQM-DateBox2/demos/fullopt.html In particular I am using the calbox option at http://dev.jtsage.com/cdn/datebox/1.1.0/jqm-datebox-1.1.0.mode.calbox.js

How can I iterate through all days shown on the calendar and get the date in the format "YYYY-MM-DD"? It is easy to get the day only since that is being shown so you can extract it from the dom - but is their a way to get the year and the month portion as well?

Thanks!

도움이 되었습니까?

해결책

you could look at

$('element').datebox('getTheDate')

but that would give you an incorrect month/year for the "other" months dates. What's your intended purpose, maybe there is a better way to go about it? (Or, if you have a compelling use case, maybe it's something that needs to be added...)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top