arshadulla / jquery-week-calendar

Automatically exported from code.google.com/p/jquery-week-calendar
0 stars 0 forks source link

select instead of input field #71

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Im creating a dj scheduler where i can select a name of the dj for the item
instead of typing a title, i created a select list with al the dj's that
work al fine, but when i want to create an new event the name doesnt
display in the calander.

i tryed also this:

...
        eventNew : function(calEvent, $event) {
            var $dialogContent = $("#event_edit_container");
            resetForm($dialogContent);
            var startField =
$dialogContent.find("select[name='start']").val(calEvent.start);
            var endField = 
$dialogContent.find("select[name='end']").val(calEvent.end);
            var titleField =
$dialogContent.find("select[name='title']").val(calEvent.title);

...

but can get it to work.

the select list looks like this:
<select name="title">

                  <option value="Name 1">Name 1</option>  
                  <option value="Name 2">Name 2</option>

</select>

Original issue reported on code.google.com by luk...@gmail.com on 19 Aug 2009 at 2:19

GoogleCodeExporter commented 8 years ago
got i fixed just changed this:

$dialogContent.find("select[name='title']").val(calEvent.title);
in
$dialogContent.find("select[name='title']");

but other question does somebody know how i write a function than when i edit a 
entry
it automatic selects te right name form from the list.
Hopefully somebody understands my englisch ;)

Original comment by luk...@gmail.com on 19 Aug 2009 at 2:54

GoogleCodeExporter commented 8 years ago
sow when the name is "Name 1"

the script does this
<select name="title">

                  <option value="Name 1" selected >Name 1</option>  
                  <option value="Name 2">Name 2</option>

</select>

Original comment by luk...@gmail.com on 19 Aug 2009 at 2:59

GoogleCodeExporter commented 8 years ago
thanks for posting your update. i'm going to close this one.

Original comment by robmo...@gmail.com on 22 Sep 2009 at 11:59