jQuery UI Widgets Forums Scheduler Default appointment value

This topic contains 4 replies, has 2 voices, and was last updated by  MichaelIP 8 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Default appointment value #80108

    MichaelIP
    Participant

    Hello,
    I would like to set default values when creating a new appointment.
    To be more precise, I would like that the AllDay checkbox is not checked per default (and therefore, enable the time selection).

    In editDialogOpen event, I do not find a way to set the fields.allDay checkbox to what I want.
    When editing an existing appointment, it’s pretty easy to do that by setting the appointment.allDay property.
    Meanwhile, as when creating a new appointment, the appointment argument is null, no way to do it !

    How can I set the allDay checkbox to unchecked when creating a new appointment ?
    By the way, if it is possible to do that, I could also set any fields in the new appointment ?

    Many thanks

    Default appointment value #80110

    Peter Stoev
    Keymaster

    Hi MichaelIP,

    The allDay checkbox is not checked by default. It is checked when you are in MonthView or when you open the dialog from the allDay area. Using the dialog’s events, you can also customize the widgets inside the Dialog.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Default appointment value #80116

    MichaelIP
    Participant

    Hello Peter.
    Thanks for your (very) quick answer.

    I do not saw that this checkbox was not checked in day or week view ! You are absolutely right.
    Meanwhile, for my needs, I need per default a monthly view, allowing appointments which are not during all day…

    I’ve tried in the editDialogOpen event to change the checkbox status.
    fields.allDay.jqxCheckBox({ checked: false });

    Using the debugger, once the checkbox is unchecked, I saw the time selection buttons appearing. Unfortunately, continuing makes these buttons disapearing (I suppose because default value for allDay is set to false in MonthView)…

    Could you please indicates me how to do this inside the Dialog ?

    Once again, many thanks.

    Default appointment value #80118

    Peter Stoev
    Keymaster

    You can use something like:

            editDialogOpen: function (dialog, fields, editAppointment) {
                setTimeout(
             function(){       fields.allDay.val(false);
            });
    

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Default appointment value #80124

    MichaelIP
    Participant

    Great !

    It works.
    It is really simple and allow me to set any fields.

    Many thanks.

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

You must be logged in to reply to this topic.