我在 FullCalendar ( http://fullcalendar.io ) 页面正下方添加了一个 datePicker ( http://www.eyecon.ro/datepicker/ ) 。
我如何将此日期选择器附加到 fullcallendar 标题上的自定义按钮上,当按下按钮时,日期选择器会出现?
谢谢
更新:添加代码
编辑:代码更新
到目前为止我写的代码是:JS:
$(function () {
//...some code.....
//fullcalendar
$('#calendar').fullCalendar({
//...options
header: {
left: 'title today',
center: '',
right: 'prevMonth prev myCustomButton next nextMonth'
},
customButtons: {
myCustomButton: {
text: ' ',
click: function () {
$('#date').DatePicker({
flat: true,
date: currentDate,
current: currentDate,
calendars: 2,
starts: 1,
onChange: function (formated, dates) {
$('#calendar').fullCalendar('gotoDate', formated);
}
});
}
},
//...other buttons
},
//....other options....
});//fullcalendar
});//$ …
Run Code Online (Sandbox Code Playgroud) 我正在使用WoocommerceNET库(Nuget Link)来开发一个桌面应用程序,该应用程序会将产品从ERP数据库同步到Woocommerce eshop数据库。
我添加了属性size和color以及值,例如red,green,blue和s,m,l,xl。现在,我需要创建变体。
试过这个:
List<VariationAttribute> vatrib = new List<VariationAttribute>()
{ new VariationAttribute() { name="Color",option="GREEN" },
new VariationAttribute() { name="size",option="L" } };
Variation var = new Variation() {
regular_price=1.0M,
visible=true,
attributes=vatrib,
stock_quantity=5,
manage_stock=true
};
//... repeat for each variation ....
List<Variation> varis = new List<Variation>();
varis.Add(var);
varis.Add(var1);
varis.Add(var2); ... and so on for all variations
Product p = new Product()
{
//options ....
type = "variable",
manage_stock = true,
in_stock = true,
attributes=attribs,
variations=varis, …
Run Code Online (Sandbox Code Playgroud)