我在我的网站中使用bootstrap-datepicker.datepicker将用于定义搜索过滤器.我需要将datepicker输入元素的初始值设置为空,因此它不会为搜索结果引入日期过滤器.当用户单击链接到Datepicker的文本输入时,Datepicker弹出框应选择下个月的第一天.
问题:如果我要设置一个初始日期(如下所示),文本输入将填充今天的日期,这不是我想要的.但是,如果我没有设置初始日期,则datepicker将显示20世纪70年代.我该怎么办?
类似于:jQueryUI Datepicker的演示
JS代码
var now = new Date();
var nextMonth = new Date();
nextMonth.setDate(1);
nextMonth.setMonth(now.getMonth() + 1);
var prettyDate = nextMonth.getMonth() + '/' + nextMonth.getDate() + '/' + nextMonth.getFullYear();
$('#listing_filter_available').val(prettyDate);
$('#listing_filter_available').datepicker();
Run Code Online (Sandbox Code Playgroud)
HTML代码
<input type="text" id="listing_filter_available" class="input-small" placeholder="Date Available" />
Run Code Online (Sandbox Code Playgroud)
尝试失败
单击文本输入el时不会弹出Datepicker
$(function() {
var now = new Date();
var nextMonth = new Date();
nextMonth.setDate(1);
nextMonth.setMonth(now.getMonth() + 1);
var prettyDate = nextMonth.getMonth() + '/' + nextMonth.getDate() + '/' + nextMonth.getFullYear();
$('#listing_filter_available').val(''); // …Run Code Online (Sandbox Code Playgroud) javascript jquery datepicker twitter-bootstrap bootstrap-datepicker
下面是一个http触发的函数。对于路线,我指定了一个变量user。现在,我希望在任何其他user输出绑定中使用该变量。现在工作代码显示为输出绑定。Blob
[FunctionName(nameof(Greeting))]
public static IActionResult Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "{user}/greeting")] HttpRequest req,
string user,
[Blob("{user}", Connection = "MyStorageAccount")] CloudBlockBlob blob)
=> new OkResult();
Run Code Online (Sandbox Code Playgroud)
注意,我实际上对创建 blob 并不感兴趣。只是对有效的语法感兴趣。
编辑:只是意识到这非常有效。
XML 附在下面。我正在使用的查询返回交叉应用于每个邮政编码的地址行。
错误的输出:
Code Reaper PC1 PC1_AL1 PC1_AL2
Code Reaper PC1 PC2_AL1 PC2_AL2
Code Reaper PC1 PC3_AL1 PC3_AL2
... 9 rows in total
Run Code Online (Sandbox Code Playgroud)
我如何获得下面的预期输出?基本上我只想要它旁边的相应邮政编码的地址行。
Code Reaper PC1 PC1_AL1 PC1_AL2
Code Reaper PC2 PC2_AL1 PC2_AL2
Code Reaper PC3 PC3_AL1 PC3_AL2
Run Code Online (Sandbox Code Playgroud)
这就是我正在尝试的。
DECLARE @XMLDocument XML
SET @XMLDocument = N'<People><Person>
<PersonDetails>
<Surname>Code</Surname>
<Forename>Reaper</Forename>
</PersonDetails>
<HomeInformation>
<Address>
<PostCode>PC1</PostCode>
<AddressLines>
<AddressLine1>PC1_AL1</AddressLine1>
<AddressLine2>PC1_AL2</AddressLine2>
</AddressLines>
</Address>
<Address>
<PostCode>PC2</PostCode>
<AddressLines>
<AddressLine1>PC2_AL1</AddressLine1>
<AddressLine2>PC2_AL2</AddressLine2>
</AddressLines>
</Address>
<Address>
<PostCode>PC3</PostCode>
<AddressLines>
<AddressLine1>PC3_AL1</AddressLine1>
<AddressLine2>PC3_AL2</AddressLine2>
</AddressLines>
</Address>
</HomeInformation>
</Person>
</People>
'
SELECT
[Surname],
[GivenName], …Run Code Online (Sandbox Code Playgroud) class MyClass extends React.Component<any, any> {
render(): JSX.Element {
return (<div>
/*<div>{this.state.myVal} Not Working</div>*/
///<div>{this.state.myVal} Not Working</div>
<!--<div>{this.state.myVal} Not Working</div>-->
</div>);
}
}
Run Code Online (Sandbox Code Playgroud)
我尝试了以上3种方式来注释整行。似乎没有任何工作。我正在使用Visual Studio,如果有所作为。
.net-core ×1
azure ×1
c# ×1
datepicker ×1
javascript ×1
jquery ×1
reactjs ×1
sql ×1
sql-server ×1
typescript ×1
xml ×1