File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 66 underlying input field is disabled.
77 * Fix #251 : In ` FileUploadWidget ` , accept MIME-type is now checked on the client side before
88 upoading a file.
9- * Use proper renderer for widget ` TelInput ` introduced in Django-6.0.
9+ * Fix: Use proper renderer for widget ` TelInput ` introduced in Django-6.0.
1010 * Fix #256 : Set position for widget ` PhoneNumberInput ` if used with a default country.
11+ * Fix: Open international selector for widget ` PhoneNumberInput ` if used without a default
12+ country and user starts typing.
1113 * Fix: In ` Selectize ` widget, when using ` filter_by ` , an empty filter value is now properly
1214 ignored when loading options lazily.
1315
Original file line number Diff line number Diff line change @@ -291,8 +291,12 @@ class PhoneNumberField {
291291 this . inputElement . value = '+' ;
292292 } else {
293293 this . inputElement . value = this . asYouType . getNumberValue ( ) ?? '' ;
294- if ( isFirst && this . defaultCountryCode ) {
295- caretPosition = this . editField . innerText . length ;
294+ if ( isFirst ) {
295+ if ( this . defaultCountryCode ) {
296+ caretPosition = this . editField . innerText . length ;
297+ } else {
298+ this . openInternationalSelector ( ) ;
299+ }
296300 }
297301 }
298302 this . setCaretPosition ( caretPosition ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class PhoneForm(forms.Form):
1515 )
1616 mobile_number = fields .CharField (
1717 label = "Mobile Number" ,
18- initial = '+43 664 1234567' ,
18+ # initial='+43 664 1234567',
1919 validators = [phone_number_validator ],
2020 widget = PhoneNumberInput (attrs = {'default-country-code' : 'at' , 'mobile-only' : True }),
2121 )
You can’t perform that action at this time.
0 commit comments