Comments (2)
This can be done without any problems, since the buttons are simply hidden using a css rule, you just need to redefine it in your component:
<style>
.daterangepicker.auto-apply .drp-buttons {
display: block;
}
</style>
It will look something like this
<style>
.daterangepicker.auto-apply .drp-buttons {
display: block;
}
</style>
<DateRangePicker @ref="Picker" AutoApply="true" @bind-StartDate="StartDate" @bind-EndDate="EndDate">
<ButtonsTemplate>
<button class="cancelBtn btn btn-sm btn-default" @onclick="@(e => ResetClick(e, context))" type="button">
Reset
</button>
</ButtonsTemplate>
</DateRangePicker>
@code {
DateRangePicker Picker;
DateTimeOffset? StartDate { get; set; }
DateTimeOffset? EndDate { get; set; }
async Task ResetClick(MouseEventArgs e, DateRangePicker picker)
{
StartDate = null;
EndDate = null;
// Close the picker
await Picker.Close();
// Fire OnRangeSelectEvent
await Picker.OnRangeSelect.InvokeAsync(new DateRange());
}
}
from blazordaterangepicker.
I see, thank you for the reply, that works, very straightforward!
from blazordaterangepicker.
Related Issues (20)
- Use isolation for JS and CSS? HOT 3
- Can't choose a single date, when the date picker was initialized. HOT 2
- .NET 6 HOT 2
- Calendar's wired behaviour while we have both binding and limits HOT 4
- How to set the calendar when opening a component set to StartDate in Inline="true" mode? HOT 1
- Config doesn't work HOT 2
- support other Calendares like PersianCalendar
- Can not bind Date Value HOT 1
- Range of one day
- Ambiguity PickerTemplate in an EditForm HOT 1
- One start date HOT 2
- disable property HOT 1
- Make sure Calendar is always visible
- add Propertie "yearShowLeft" HOT 1
- single picker and buttons not visible HOT 1
- Disable date without data HOT 2
- Show dateTimePicker on click image HOT 1
- Single select HOT 2
- Date picker hided on mobile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazordaterangepicker.