change date format in html
<input type="date" name="begin"
placeholder="dd-mm-yyyy" value=""
min="1997-01-01" max="2030-12-31">
change date format in html
<input type="date" name="begin"
placeholder="dd-mm-yyyy" value=""
min="1997-01-01" max="2030-12-31">
how to set a date for type date inpt
<input type="date" id="start" name="trip-start" value="2018-07-22">
input type date on change
var date_input = document.getElementById('date_input');
date_input.valueAsDate = new Date();
date_input.onchange = function(){
console.log(this.value);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="date" id='date_input'>
DateTimeField change format
class UserSerializer(serializers.ModelSerializer):
date_joined = serializers.DateTimeField(format="<Your format>")
class Meta:
model = User
fields = ('username', 'email', 'first_name', 'last_name', 'is_superuser', 'is_staff', 'is_active','get_absolute_url')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us