$("#expDate").datepicker();
$(".ui-datepicker").css({ 'z-index': 1003});
$("#saveToListDialog").dialog({
autoOpen: false,
model: true,
position: 'center',
title: 'Create List',
zIndex: -1,
buttons: {
"Cancel": function(){
$(this).dialog("close")
},
"Save": function(){
blackbird.debug("name: " + $("#listName").val());
$.post('/list/saveList',
{
name: $("#listName").val(),
comment: $("#listComments").val(),
expireDate: $("#expDate").val()
},
function(){
loadWidget("allLists", "results");
});
$(this).dialog("close");
}
}
});
And this is the html I'm using for the dialog:
<div id="saveToListDialog">
<div>
List Name: <input type="text" id="listName"/>
</div>
<div>
Comments: <textarea id="listComments"/>
</div>
<div>
Expiration Date: <input type="text" id="expDate"/>
</div>
</div>