Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

محدود بودن سال #25

Open
alirezanejat008 opened this issue Feb 3, 2024 · 1 comment
Open

محدود بودن سال #25

alirezanejat008 opened this issue Feb 3, 2024 · 1 comment

Comments

@alirezanejat008
Copy link

با سلام و عرض خسته نباشید
موقعی که changeYear: true هست تا سال ۱۳۹۲ بیشتر عقب نمی ره. چطور می شه کاری کرد که از سال ۱۳۹۲ قبل تر هم نشون بده؟ من برای انتخابگر تاریخ تولد استفاده کردم و لازمه قبل تر هم قابل انتخاب باشه. ممنون میشم راهنمایی بفرمایید.

@alirezanejat008
Copy link
Author

سلام مجدد
[تا قبل از اینکه خود صاحب اثر به این مساله در این ریپو پاسخ بدن و راه حل استاندارد برای مساله پیدا بشه]
راه حل شخصی من کد جی کوئری زیر هست که به محض کلیک روی select مربوط به سال عمل می کنه و سال های قبل از اولین سال رو تا سال ۱۳۰۰ درج می کنه. اگر بخواید قبل ۱۳۰۰ هم درج شه کافیه عدد ۱۲۹۹ رو تغییر بدید.
$(document).ready(function () {
$('#ui-datepicker-div').on('click', '.ui-datepicker-year', function () {
var c = $(this).find('option').length;
var first = Number($(this).find('option:first').attr('value'));
if (typeof first === 'number') {
if (first != 1300) {
first--;
for (let i = first; i > 1299; i--) {
$(this).prepend("<option value="" + i.toString() + "">" + i.toString() + "");
}
}
}
});
});
به امید جواب اصلی و استاندارد از صاحب اثر

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant