配置如下:
日期控件:格式为日期或者YYYY-MM
if(FORMAT($queryMonth,"yyyyMM")>FORMAT(TODAY(),"yyyyMM"),0,day(DATEDELTA(if(date(year($queryMonth),month($queryMonth) + 1,1) > today(),today(),date(year($queryMonth),month($queryMonth) + 1,1)),-1)))
日期控件或者字符串或者数字控件,返回格式为字符
if($queryMonth>FORMAT(TODAY(),"yyyyMM"),0,day(DATEDELTA(if(date(LEFT($queryMonth,4),RIGHT($queryMonth,2) + 1,1) >= today(),today(),date(LEFT($queryMonth,4),RIGHT($queryMonth,2)+1,1)),-1)))