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

نحوه استفاده در صورت استفاده از کلاس #47

Closed
iamhaaamed opened this issue Jul 22, 2017 · 3 comments
Closed
Labels

Comments

@iamhaaamed
Copy link

با سلام
در صورتی که بخوایم به المنت هایی که میخوایم دیت پیکر داشته باشن یک کلاس بدیم و همه اون المنت هایی که اون کلاس رو دارن دیت پیکرو نمایش بدن به صورتی که بعد از انتخاب تاریخ، تاریخ انتخاب شده داخل المنت خودش نمایش داده بشه به چه صورتی باید عمل کرد؟

$('.datePicker').each(function() {
$(this).MdPersianDateTimePicker({
Placement: 'popover',
Trigger: 'click',
EnableTimePicker: false,
TargetSelector: ???????????,
GroupId: '',
ToDate: false,
FromDate: false,
DisableBeforeToday: false,
Disabled: false,
Format: 'yyyy/MM/dd',
IsGregorian: false,
EnglishNumber: true,
});
});

@Ham3D
Copy link

Ham3D commented Jul 28, 2017

If we choose to let TargetSelector empty it should pick its parent input right ?
but it wont.
how can we populate Target selector on the fly , for example when we use a plugin like jquery Repeater.

@Mds92
Copy link
Owner

Mds92 commented Aug 12, 2017

سلام، داخل متد each
بنویسید

$(this).MdPersianDateTimePicker({
    Placement: 'left',
    Trigger: 'click',
    EnableTimePicker: false,
    TargetSelector: '#' + $(this).attr('id'),
    GroupId: '',
    ToDate: false,
    FromDate: false,
    DisableBeforeToday: false,
    Disabled: false,
    Format: 'yyyy/MM/dd',
    IsGregorian: false
});

@Mds92 Mds92 added the question label Aug 12, 2017
@Ham3D
Copy link

Ham3D commented Aug 13, 2017 via email

@Mds92 Mds92 closed this as completed Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants