jQuery UI Widgets Forums Scheduler Prefill Subject

This topic contains 7 replies, has 2 voices, and was last updated by  son0fvashon 7 years, 9 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Prefill Subject #90180

    son0fvashon
    Participant

    Hello,

    I want to prefill the Subject field when I first create a new appointment. Is there a way to do that. As far as i was able to find out all the events editDialogOpen and editDialogCreate are trieggered after the edit Dialog is created and Prefilled with e.g. the start date and time.

    I would like to thank you in advance for your help.

    Prefill Subject #90200

    Hristo
    Participant

    Hello son0fvashon,

    Unfortunately, no such property.
    You could try to create a workaround.
    I would like to suggest you one hint (you could create customizations in editDialogCreate callback):

    var titleContainer = $('.jqx-scheduler-edit-dialog-label')[0].nextElementSibling;
    var titleInput = $(titleContainer).find('input');
    titleInput.val('prefix');

    Please, take a look at this demo, as a base:
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxscheduler/scheduler-edit-dialog.htm?light

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Prefill Subject #90208

    son0fvashon
    Participant

    Hello Hristo

    Thanks for your input. That workaround works great for me and fits my needs.

    Regards
    son0fvashon

    Prefill Subject #90226

    son0fvashon
    Participant

    Hello,

    I ran in kind of the same problem agian but this time with the to date. I tried to use the methode that you sugested but as soon as you change the from date it removes my previosly set value and goes back to the default 30 min offset. So the problem is not setting the “to date” but rathe that it behaves like i usually would when you enter a date manualy.

    To explan what i try to do: I have a selection of different types of appointments on my page and as soon as you select one and open the edit dialog it should prefil the subject (as described above) and the to date field.

    I hope someone can help me with this.

    Regards
    son0fvashon

    Prefill Subject #90250

    Hristo
    Participant

    Hello son0fvashon,

    The Scheduler by design is created to set a default value for the date/time.
    You could try to set new date in same callback (editDialogCreate) but with follow approach: fields.from.val('23/11/2016 11:14 AM').
    And will add automatically time for the “to”. If you want to set a custom time for this place just set fields.from.val... in setTimeout.
    Hope this helps.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Prefill Subject #90258

    son0fvashon
    Participant

    Hello Hristo

    I tried to set the from field like you said but it only changes the displayed value. As soon as i change the value, e.g. 1 minute up, it changes back to the original value before i changed the time. As far as i can tell it has to do something with the DateTimeInput but i don’t know how to change that. Maybe you have an idea on how to change this.

    Thank you.

    Prefill Subject #90294

    Hristo
    Participant

    Hello son0fvashon,

    Please, take a look at this example:
    https://www.jseditor.io/?key=scheduler-customization

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Prefill Subject #90338

    son0fvashon
    Participant

    Thnak you very much Hristo, this worked great.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.